Hello Guest

Author Topic: Error on run  (Read 3906 times)

phatality123

  • Newbie
  • *
  • Posts: 5
    • View Profile
Error on run
« on: September 17, 2012, 01:27:16 am »
When I run my game, I get this error:

Instance of tk2dAnimatedSpriteEditor couldn't be created. The script class needs to derive from ScriptableObject and be placed in the Assets/Editor folder.

Anyone know how to fix it? Heres my script, too:
#pragma strict
var Ryuuji : tk2dAnimatedSprite;
function Start () {

}

function Update () {
   if(Input.GetButton("Vertical")){
   Ryuuji.Play("WalkForward");
   }
}


Also, when I hit the up arrow key, It shows the first frame of his "WalkForward" animation but it doesn't play the full animation unless I let go of the arrow key. Any way I can make it so the opposite thing happens? (As in when I hit the up arrow key his animation plays and when I let go of it his animation stops). Many thanks.

Ok, I got that part fixed, but now I'm getting this error when I add the StopAndResetFrame component:

Assets/TK2DROOT/tk2d_demo/TestAnimationPlay.js(12,16): BCE0019: 'StopAndResetFrame' is not a member of 'tk2dAnimatedSprite'.
« Last Edit: September 17, 2012, 01:42:50 am by phatality123 »

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Error on run
« Reply #1 on: September 17, 2012, 08:14:31 am »
I'm not sure what you've done and what you haven't, but most importantly have you run the "2D Toolkit/Setup for JS" menu item?

phatality123

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: Error on run
« Reply #2 on: September 18, 2012, 12:07:20 am »
Even when I click that button (Setup for JS), it just keeps showing that error :l.....

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Error on run
« Reply #3 on: September 18, 2012, 08:58:45 am »
Easiest thing to do is if you can, zip up the project, and email to support@unikronsoftware.com. Let me know if you cant do that and I'll see if I can think of more suggestions.

phatality123

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: Error on run
« Reply #4 on: September 19, 2012, 03:12:31 am »
Ok I'll send the project.