[英]How to draw GL premitives behind GameObject in Unity3d
I have a question that I can't find in a documentation. 我有一个在文档中找不到的问题。 I use GL premitives to draw grid.
我使用GL谓词绘制网格。 But I can't understand how to push it behind gameObjects.
但是我不明白如何将其推到gameObjects之后。 Now grid is drawing on main Camera in OnRenderObject, and as result I see grid in front of gameObjects.
现在网格在OnRenderObject中的主Camera上绘制,结果我在gameObjects前面看到了网格。 If I draw it in Update or LateUpdate the grid is visible only in Scene mode.
如果我在Update或LateUpdate中绘制它,则该网格仅在“场景”模式下可见。 So, please, tell me what options do I have?
所以,请告诉我我有哪些选择?
I see... 我懂了...
Both of these fire before anything renders. 这两件事在任何事情发生之前就已经开火了。 Whereas the method you're using now has this description:
而您正在使用的方法现在具有以下说明:
OnRenderObject is called after camera has rendered the scene.
相机渲染场景后调用OnRenderObject。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.