Documenting Unity classes/ components/ system

Hi, as per ususal I have spent more tim ein the code than at the drawing board designing it.
I am growing my appreciation for a pre-development strategy/design and ongoing documentation but , I need to docuement and reverse engineer the structure i guess.

MY question though is…
can someboody show me a successful or succinct class design (UML preferably) - typifying unity class designs, or component oriented designs (as i belive Unity is coined as Componet oriented, as opposed to Object Oriented in the strictest sense, though C# helps enforce that a little etc )

Thanks in advance , as I get such great help from people on here !
Gruffy

I strongly recommend:

  • XML comments +
  • Doxygen +
  • Graphviz

It may seem a little complicated to set up at first, but it will save you HUGE time in the long run, and really it’s not even that complicated to set up.

First, the MonoDevelop/Visual Studio editor will help you out a lot. In front of any item (class, variable, method, etc), just type “///”. The editor will fill in an XML template and attempt to auto-document the item. You can adjust the comments however you want.

Next, install Doxygen and Jacob Pennock’s Doxygen Unity integration. In that link, he also posted a video of how to set it up and use it. Even if you haven’t added the XML comments in the step above, Doxygen will still generate some decent documentation.

Finally, install Graphviz. In the Doxygen configuration file (Doxyfile), set “HAVE_DOT = YES”. This will allow Doxygen to automatically create UML-like inheritance diagrams.

Once you have this set up, one button will generate your entire documentation. For an example of the kind of output this will give you, you can browse through NGUI’s documentation: NGUI: Next-Gen UI kit: Class List