Search Unity

  1. Check out the Unite LA keynote for updates on the Visual Effect Editor, the FPS Sample, ECS, Unity for Film and more! Watch it now!
    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. Improved Prefab workflow (includes Nested Prefabs!), 2D isometric Tilemap and more! Get the 2018.3 Beta now.
    Dismiss Notice
  4. Want more efficiency in your development work? Sign up to receive weekly tech and creative know-how from Unity experts.
    Dismiss Notice
  5. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice
  6. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

Documentation around order of excecution is misleading

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

  1. felixfaire


    Nov 6, 2017
    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.

    Last edited: Jul 4, 2018