I'm working on a custom material editor window. The Inspector preview in the Unity interface is something I want to replicate. I do not know, but suspect that Unity has a scene, somewhere hidden, with a camera, lights and geometry that is rendered separately and then updates the window. Is is possible to trigger, or include a different scene during the GUI update? Thanks, Doc
I dont know material editor(will make tommorow ) but i know my good bro who has already done that but its 2d ! Also It Can Be Found on armedunity.com http://armedunity.com/files/go/c21ef2d1274aec2682e793f3d530cb19/upaint Credits : OcularCash
Thanks...clever but I'm looking to replicate the 'Material Preview' as it is in the Inspector. Any thoughts? Is it possible to render a scene from file?
i think its not possible to render a scene from file. Ohhh Idea make sphere and add script to make it rotateble than do the materials with ocular cashs tool and you will get some kind of that thing what you want also use scripts from that tool, But do not start to sell it !
I was trying to avoid having the sphere and camera in the scene, but that is possible to make a mini scene and hide it out of the way if I'm following what you mean.
Thanks for the plug Fr33ke. But in this case, you would actually use Graphics.DrawMesh to draw a mesh in a given camera with a given material, then render the camera in the editor window. You can use RenderTexture if you have Unity Pro or you can place a script on a camera in the scene that creates an empty texture and gets the pixels from that camera in the OnPostRender function.