- Home /
I know C#, but what Unity methods should I learn?
OK. I have been on this website: http://docs.unity3d.com/Documentation/ScriptReference/MonoBehaviour.html but there are a lot of methods. Please could you give me a list of main methods used in unity? I have learnt to use C#. I can write custom classes, methods; I understand inheritance, objects and their types etc...
You should use whichever language you best know, unless you specifically want to learn another. They can pretty much all do the same exact things in Unity. It's really all preference .
You might want to look at the common beginner mistakes from here: http://unitygems.com/mistakes1/
Theres a serie of videos on youtube from the tornado twins where they make a small game called "wor$$anonymous$$ator" "tornado twins tutorial worm" search on youtube should bring it. That video is good to get you going with unity.
Answer by Bunny83 · Nov 01, 2012 at 05:23 PM
You can'r really "learn a method". All you need to know what a method is doing and which callbacks (overridable methods) are called in which situations. Just take the time and browse through them. The detailed description explain 95% what you have to know.
For example OnBecameVisible: The description clearly explains that this callback is invoked by a Renderer component. Almost all callbacks belong to a certain component. MonoBehaviour has some that belong to itself (since MonoBehaviour is also a component).
Here i grouped them into a more logical order:
MonoBehaviour itself
Update, LateUpdate, FixedUpdate, Awake, Start, Reset
OnApplicationPause, OnApplicationFocus, OnApplicationQuit
OnLevelWasLoaded, OnEnable, OnDisable, OnDestroy
OnGUI
Send by Collider
OnMouseEnter,OnMouseOver,OnMouseExit,OnMouseDown,OnMouseUp,OnMouseUpAsButton,OnMouseDrag
Send by Rigidbody for "isTrigger"-collider
OnTriggerEnter,OnTriggerExit,OnTriggerStay
Send by Rigidbody for normal collider
OnCollisionEnter,OnCollisionExit,OnCollisionStay
Send by CharacterController OnControllerColliderHit
Send by Physx joint component
OnJointBreak
Send by ParticleCollider
OnParticleCollision
Send by Renderer
OnBecameVisible, OnBecameInvisible
Send by Camera
OnPreCull, OnPreRender, OnPostRender, OnRenderObject, OnWillRenderObject, OnRenderImage
Only in Editor
OnDrawGizmosSelected,OnDrawGizmos
Send when using Networking
OnPlayerConnected, OnServerInitialized, OnConnectedToServer, OnPlayerDisconnected,
OnDisconnectedFromServer, OnFailedToConnect
Send when using MasterServer
OnFailedToConnectToMasterServer, OnMasterServerEvent
Send by NetworkView components
OnNetworkInstantiate, OnSerializeNetworkView
Send by AudioSource components
OnAudioFilterRead
Answer by Eric5h5 · Nov 01, 2012 at 05:43 PM
You should know them all, or at least be aware of them. It's not expected that you should memorize the entire API (you can always just look stuff up in the docs for exact usage when needed), but you should know what's available so you don't waste time reinventing the wheel.
Your answer

Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
Moving and Attacking 0 Answers
Rays and tags help? 1 Answer
Fading To New Scene Problem? 1 Answer