From Unify Community Wiki
Revision as of 19:06, 19 October 2009 by NCarter
- Only Monobehaviours can use print(). This means that if you're using a custom class and need to debug it, you need to use Debug.Log(str) instead. This will work both inside MonoBehaviours and non-MonoBehaviours alike.
- If a class inherits from another class, and an instance is explicitly declared as the parent class, it will always call the parent's function - even if the child overrides it! The workaround is to make the instance a typeless variable. (The easiest way is to define the type as object: var variable_name : object;)