- Home /
Create a custom fullscreen game view window
Hi! I'm planning to use Unity for some psychophysical experiments. Therefore I want to create a custom game view EditorWindow from script in the Unity Editor during Play mode, and have the window fullscreen on my second monitor for the subject, similar to what Psychtoolbox does.
The main reason why I choose not to compile my game into a standalone version is that I'm making many modifications everyday. Re-compiling is very time-consuming. Also with the Play mode in Unity Editor, I can change the properties of GameObject during experiment easily without designing the GUI myself, which I would need for a standalone game.
More specifically, my question can be divided into two:
How to create a custom game view without the header (i.e. the row where you can choose resolution scale etc.) I know how to create a second original game view window with reflection. However I don't like the header row. I wonder if I can create a custom EditorWindow with a Texture2D only that updates the rendered frames just as the usual game view window does.
How to truly make a EditorWindow fullscreen? Maximizing the window seems to leave an ugly window bar on top so that you can still move and close the window by mouse. What if I want to remove that part as well?
If anyone can help me with at least one of the questions, that would be really helpful! Thank you!
Ok I found this solution: FULL 'Full Screen On Play' Script
But Unity refused to allow me to set the position of an EditorWindow with a Rect containing negative y value. I can drag the window up to make the position negative in Rect.y, but I cannot set it by script. Why?
Ok I solved the problem. Use reflection and (EditorWindow) ScriptableObject.CreateInstance(type) to create the window. Use ShowPopup() to show the window and use the position property to place it on the monitor you want. You get a nice Psychtoolbox-like game view.
Your answer
Follow this Question
Related Questions
why I Cant Add Multiple Objects to the "Object Field" in Editor Window? 3 Answers
How do I make a progress bar in the editor lock the background? 0 Answers
How to make multiple EditorWindows dock together? 0 Answers
Create custom asset and add editor window 1 Answer
Editor window script only works when window is open? 1 Answer