Search Unity

  1. Unity 2019.1 beta is now available.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. We're looking for insight from anyone who has experience with game testing to help us better Unity. Take our survey here. If chosen to participate you'll be entered into a sweepstake to win an Amazon gift card.
    Dismiss Notice
  4. Want to provide direct feedback to the Unity team? Join the Unity Advisory Panel.
    Dismiss Notice
  5. Unity 2018.3 is now released.
    Dismiss Notice
  6. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice

Documentation around order of excecution is misleading

Discussion in 'Documentation' started by felixfaire, Jul 4, 2018.

  1. felixfaire

    felixfaire

    Joined:
    Nov 6, 2017
    Posts:
    1
    The documentation states:
    • OnRenderObject: Called after all regular scene rendering is done. You can use GL class or Graphics.DrawMeshNow to draw custom geometry at this point.
    • OnPostRender: Called after a camera finishes rendering the scene.
    "after a camera finishes" and "when regular scene rendering is done" do not sufficiently explain this execution order (see this post). It should be made clear that the OnPostRender() of a camera will get called before the OnRenderObject() of an object being rendered with that camera. The reason why it actually does this is also a mystery as it doesn't make semantic sense; most users (myself included) would surely expect OnRenderObject() to happen Before OnPostRender(). It would be good if the documentation was at least clear about this 'quirk' so others dont waste as much time as I have trying to use these features.

    Best.
     
    Last edited: Jul 4, 2018