- Home /
How to access a Game Object from a non-mono behaviour Class
I need to move a game object from a class which is not a "MonoBehaviour" class. In my code what i do is first initiate the object in the main (monoBehavior) class and then pass that GameObject into my general class. Inside my general class im getting some data from a network connection. I need to move my object using those data come from network. But it didnt work.
iTween.MoveTo(point,iTween.Hash("x",System.Convert.ToInt32(msg),"time",1));
Any suggestions.
Why dont you make your classes base class monobehavior? if it inherits from it ultimately it will have access to all the things any other mono class does surely.
It wasnt really a full answer it was a suggestion/question.
Answer by DaveA · Oct 13, 2011 at 12:47 AM
I don't know about iTween but I don't see why it shouldn't work. That said, maybe SendMessage is another way to go.