Hello,
I've been trying to set up an Editor Window that mimics the default Scene View with a few extra project related features, similar to a middleware solution. To do this, it needs to render a camera created and hidden with hide flags to the window, and then have additional details drawn in relation to specific points in the scene.
I've done this by using Handles, but the documentation for this class is both deprecated and not very descriptive. I've got it rendering properly and all of the extra features functioning, but there is a major crippling bug.
The camera does not render with a depth buffer, so objects are "randomly" drawn over other objects. I don't think its a problem with how I'm using the Handles class, because when I try directly calling .Render() from the camera it still rendering incorrectly. I've commented out all of my other code when I do this, so I am sure it is nothing I have done wrong, but more what I'm not doing.
Here's what I've found out from trying to debug this problem over the last few days:
- The camera itself is fine, if I don't hide it with hide flags and view the preview in the default Scene View, it renders correctly.
- The scene can be renderred correctly with a Render Texture, but what I'm working on has to be usable on an Indie version of Unity (I myself have a Pro License). I am also in doubt some of the required features will work in conjunction with Render Textures.
- It's nothing wrong in my code, as I've tried rendering in an empty class with no adjoining code seperately to my main Editor Window, so it has to be a limitation of the editor scripting or something that I'm not doing (like telling it to render with depth).
Does anyone have any experience with this type of problem? I haven't been able to find any related questions posted on the site, besides these:
http://answers.unity3d.com/questions/24070/debug-rendering-using-the-depth-buffer
These were the closest I found and neither helped solve the problem. So either my problem is really simple (probably), or not many people are doing this (less likely).
Thanks.