iTween not recognized in script

I am using iTween to move a menu item, following a tutorial on the web. I am getting an unknown identifier for iTween when it tries to compile. I do have the iTween script in the project. is there another line to identify the script? thanks

here is the script:

function Start() { while(true) { OnSelected(true); yield new WaitForSeconds(1.0); OnSelected(false); yield new WaitForSeconds(1.0); } }

function OnSelected(on:boolean) { //I just got selected if(on) { iTween.moveTo(gameObject,{"x-axes":-1.0, "time":0.5}); } else //I just got deselected{ { iTween.moveTo(gameObject,{"x-axes":0.5, "time":0.5}); } }

2 Answers

2

I'd recommend upgrading to iTween 2.0 as this should fix the problems you are having.

Right you are basically getting the Itween problem, i had the same thing to fix this there are 2 simple solutions

1*

on the script where it says "MoveTo" replace this with moveAdd in order for this to work you need the iTween JavaScript version which is available on there site link provided below:

http://itween.pixelplacement.com/index.php

2 option is:

if you have a iTween Script that's done on Java replace it with C# Version or if you have a C# version replace that with the java version.

i really hope his solves your problem best of luck MCHALO