Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Class Diagram

Discussion in 'Scripting' started by Iruka, Mar 21, 2011.

  1. Iruka

    Iruka

    Joined:
    Mar 19, 2011
    Posts:
    3
    Hello All,

    for me, a class diagram displaying the hierarchy of the standard unity-classes and the most basic information for them would be extremly helpful, especially for teaching. I'm using this for flash:
    http://blog.go4flash.com/cheatsheets/as3cheatsheets/as3classdiagram/

    Does anybody know such a diagram for Unity or is working on it? We are starting to create one, but it's better to check if there is one existing already.
     
  2. shaderx

    shaderx

    Joined:
    May 9, 2010
    Posts:
    65
    that would be helpful , and thanks for the flash one , i didn't know about it .
     
  3. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    You can create one easily inside of visual studio by the corresponding function
    but its use is questionable, as there is not really much of a hierarchy at all, the only real hierarchy there is is in UnityEngine is

    UnityEngine.Object -> UnityEngine.ScriptableObject -> Component -> Behaviour -> MonoBehaviour

    All the rest you see either extends Object, ScriptableObject, Component (that are things you can drag on game object but that don't offer "enabled" like colliders and transform) or MonoBehaviours (your code on game objects)
    The direct base classes are mentioned in the docs btw.


    The rest of what you use in Unity is .NET and doing a class diagram for that is something you can forget, also it makes totally no sense at all as its not required. Visual Studio and MonoDevelop are there to prevent exactly this kind of extremely over-documentation insanity.

    If you intend to teach UnityScript instead of C#, then I wouldn't bother with the class diagram either as it will cause more confusion than help, its easier if you teach them how to use the MSDN properly and do basic c# -> UnityScript translations to understand what they read
     
  4. Iruka

    Iruka

    Joined:
    Mar 19, 2011
    Posts:
    3
    Well, one could argue if a class diagram is already insanity. However, as I wrote, it's helpful to me personally for whatever reason.

    I'm not working with Visual Studio, but since you wrote that it is easy to create for you:
    would you mind to post one here?
     
  5. Iruka

    Iruka

    Joined:
    Mar 19, 2011
    Posts:
    3
    Not that easy after all?