Calling iTween event on another game object

Hi everyone,

This is causing me a headache as it should be simple but I can’t get it to work. I have a GO with a script on it that is trying to start an iTween event on a child GO. I’ve tried the following:

GameObject osprey = GameObject.FindGameObjectWithTag("helo") as GameObject;

iTweenEvent.GetEvent(osprey, "Land").Play();

But nothing happens when the code is executed. I’ve set the iTween event to autoplay and it works fine, so the iTween’s MoveTo settings are working okay, I just can’t seem to get the animation to run from code when I turn Play Automatically off.

The child GO is tagged “helo”, the iTween event is named “Land”, but when I press the key to cause that iTween to be executed nothing happens. I get a debug print in the same function so I know it’s being called - the problem lies with the two lines above. :frowning:

Any help would be appreciated! Thanks.

Sorted it. I was using a prefab in the game with this code in it, and an instance of the prefab in the editor to change settings etc, so when I ran the example, there were two instances of the same GO in the game which caused iTween to hiccup.

I just deleted the extra instance and it works fine now.