Is there a UML diagram for unity?

Is there a UML diagram for unity?
I’m trying to figure out how unity is structured, so that I can better know how to program in c#. I’m trying to program a game with characters (meshes, and transforms, and textures oh my) and I need to know how that all works together. A UML diagram would be an excellent start.


What about a flow chart instead :slight_smile:

I believe there is none, but because I’m not sure I will post this as a comment.

And this is the main structure you will find in Unity

UnityEngine.Object → UnityEngine.ScriptableObject → Component → Behaviour → MonoBehaviour

Your classes almost always derive from MonoBehaviour. (Sometimes ScriptableObject or simply System.Object)

Also, everything you see in the Hierarchy of Unity is a GameObject. (GameObject derives from UnityEngine.Object)

Everything you see in the Inspector (a.k.a. Transform, Camera etc.) is a Component (or derives from it). One GameObject can have many Components, One Component only has one gameObject which it is attatched to.

Then there are the values you can set inside the Components in the inspector (transform.position.x, camera.depth, any public variable in your script, etc.) These values can be of any type. As long as Unity knows how to serialize them. (I believe Unity knows how to serialize all things that derive from UnityEngine.Object)

And maybe this post might help you.

This UnityAnswers though… I fill this in in the comment section, but accidentally press Post your Answer (which field was empty btw) and then my comment gets posted as an answer… Sorry for that