2D Toolkit Forum
2D Toolkit => Support => Topic started by: phatality123 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'.
-
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?
-
Even when I click that button (Setup for JS), it just keeps showing that error :l.....
-
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.
-
Ok I'll send the project.