- Home /
How to create an editor screenview like "camera preview" window for cameras?
Basically I want to be able to create my own editor window which displays a camera view, simliar to the preview you have with Camera scripts. Is there anybody who knows a method of doing so? Thanks in advance
Answer by Skjalg · Nov 13, 2010 at 10:45 AM
My guess would be something along the lines of:
You can create a window in your gui with Gui.Window http://unity3d.com/support/documentation/ScriptReference/GUI.Window.html?from=EditorWindow
Have the window you just made contain a RenderTexture. http://unity3d.com/support/documentation/Components/class-RenderTexture.html
Then you need to project the camera onto the texture using a RenderTexture
(Pro feature only).
Answer by qholmes · Apr 01, 2011 at 06:28 PM
Ok so what i am looking for might be this as well...
I want to be able to have a live preview of what ever camera is selected like the tiny Camera Preview window that shows up but full size of one of my editor windows. This seems like a very basic thing to have to me but i can not seem to find it anywhere..
Q
Greetings, i have same problem, did you found a solution?
Answer by Luckymouse · May 23, 2012 at 11:21 AM
http://unity3d.com/support/documentation/ScriptReference/EditorWindow-autoRepaintOnSceneChange
[Edit] It uses the RenderTexture, so it is for Unity Pro only.
Maybe that help~
Answer by startassets · Mar 12, 2017 at 07:46 PM
@Rasmus Schlnsen I've just finished my own preview asset, maybe it will be useful for you: https://forum.unity3d.com/threads/powerful-preview.460157/
Your answer
Follow this Question
Related Questions
How can I simulate the "f" hotkey in the editor? 4 Answers
The name 'Joystick' does not denote a valid type ('not found') 2 Answers
Best way to manage multiple camera angles? 3 Answers
Cross project scripting? 1 Answer
How can an editor script know when another script was removed from the project? 1 Answer