- Home /
iTweenPath ScriptableObject error?
Hello,
I am using iTweenPath and trying to move my cube like the example, I am coding using Javascript. My code for the script attached to my cube is
function Update() {
iTween.MoveTo(gameObject,iTween.Hash("path", iTweenPath.GetPath("BoxIn"), "time", 5));
}
And I have iTween.cs, iTweenPath.cs in main plugins folder and iTweenPathEditor.cs in /Plugins/Editor/
I run it and I get "Instance of iTweenPathEditor couldn't be created. The script class needs to derive from ScriptableObject and be placed in the Assets/Editor folder."
How can I fix this error?
Thanks!
Answer by Paul 7 · Mar 29, 2011 at 07:08 PM
You have your editor folder inside Plugins rather than in Assets. Hierarchy looks like this:
- Assets - Editor, PlugIns, Resorces (folders)
- Editor - iTweenPathEditor.cs
- PlugIns - iTween.cs
- Resources - Scripts, Prefabs, textures, ect.
Answer by ben · Mar 23, 2011 at 02:58 PM
u should write ur code in c# only
void Start() { iTween.MoveTo(gameObject, iTween.Hash("path", iTweenPath.GetPath("BoxIn"), "time" , 5, "easeType", iTween.EaseType.easeInOutSine)); }