As my first post of this type, I think I should introduce my purpose. I find the Unity documentation quite lacking, I would say that much harsher but I forbear. I have been coding since I was 14 and am now 48. I have a long history of reading documentation from all the major players over the last 30 years. Instead of just being frustrated about Unity documentation I have decided to do something about it. I hope to make a post about everything I find difficult to understand, incomplete, or missing.
One major overall though first: Please combine the “manual” and the “scripting” documentation, ala the MSDN of the 90’s. Great documentation, and included books on every facet of software design. Unity scripting (once improved) could be that great documentation and then the manual becomes a book on game design (allowing for additional books to be added that actually cover advanced game design issues).
First post:
This page:
http://docs.unity3d.com/Manual/UICanvas.html
Says:
"Draw order of elements
UI elements in the Canvas are drawn in the same order they appear in the Hierarchy. The first child is drawn first, the second child next, and so on. If two UI elements overlap, the later one will appear on top of the earlier one.
To change which element appear on top of other elements, simply reorder the elements in the Hierarchy by dragging them. The order can also be controlled from scripting by using these methods on the Transform component: SetAsFirstSibling, SetAsLastSibling, and SetSiblingIndex."
What that leaves out is the order that grandchild elements are drawn. I assume that child 1 (1.1) of child 1 (1) is drawn before child 2 (2) and all of child 2’s children (2.1, 2.2, 2.3, etc). But further does SetSiblingIndex violate hierarchy order and allow me to set a grandchild of an earlier sibling to be drawn after a later sibling? Can I use SetSiblingIndex to have grandchild 1.1 draw after child 2? Does the index start with the first child (it does per the documentation) and then proceed to that child’s children or to the next sibling in line? The documentation is unclear at best and the scripting documentation of SetSiblingIndex is a joke.
I hope these posts are well received and that it starts a community of people posting their improvements to the documentation.