- Home /
Are textured/z-clipped gizmos possible?
I want to draw a textured / z-clipped gizmo in the editor view to show where my player clipping areas are in my scene.
I've tried using Graphics.DrawMeshNow (disables gizmo picking), Graphics.DrawMesh (always draws the gizmos in in-editor game view) and I started trying to use GL (material.SetPass() disables picking too).
Can anyone suggest anything? I'm not too keen on instancing an invisible gameObject, because it's just another object to keep track of, and I need a solution that doesn't add unnecessary data to the final build.
Is it possible to pass 'fake' hit regions to the gizmo handlers so that picking becomes possible again? (I've tried via Handles, but alas, no luck)
Thanks, guys and gals.
Why not just tag the helper Game Objects EditorOnly? Parent them all to one Game Object to $$anonymous$$imize Hierarchy clutter, or use HideFlags.HideInHierarchy.
I considered that, but it's still extra objects lying around the scene that need to be managed somehow, either by the level designer or via code, neither of which is appealing. I've pretty much concluded that what I want to do is impossible at the moment, but a method of drawing arbitrary (z-clipped) geometry in Gizmo calls isn't a big thing to ask for in future versions. I hope :P
I've just tried implementing via this method and it's still far from ideal, as regardless of hide flags the object is still visible in the hierarchy, you need to hack something awful to make the object invisible to the camera and if the visibility object is selectable you select it and not it's parent. Seems to be a lose lose lose lose situation ;)
Your answer
Follow this Question
Related Questions
How to draw a textured plane in Editor? 2 Answers
Delta event out of Editor Problem 4 Answers
Handles.matrix seems strange? 2 Answers
Mipmap view not working in editor. 0 Answers
Animation stops Recast from working 0 Answers