Open Game Window programmatically : EditorWindow.GetWindow (typeof(Game));
Hello,
I was wondering how to open the game view by means of programming. I'd like to make a button in an editor window that opens the game view.
I was thinking this might work, but it didn't:
public static void ShowWindow ()
{
EditorWindow.GetWindow (typeof(Game));
GetWindow<Game> ().Show ();
}
I've googled this question in many different ways, but there doesn't seem to be to many questions about this out there; So hopefully someone can help with this :)
Thanks for your time.
Answer by ClearRoseOfWar · Feb 08, 2016 at 09:17 PM
I found it here :)
https://gist.github.com/neon-izm/2eded3e6949064113442
EditorApplication.ExecuteMenuItem ("Window/Game");
Your answer
Follow this Question
Related Questions
Why Does Preference Item Restart whenever project is updated or played 0 Answers
adding two integers together once every half second,adding two integers together with delay? 1 Answer
Object with rigidbody2D doesn't move when it's supposed to, 0 Answers
1. How many game objects(like Shpere) we can create per frame in unity? 0 Answers
Help with pause menu? 0 Answers