Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

442
Views
How to create a window in Unity from a script and attach it to an existing tab?

i'm trying to make a custom editor script for Unity, but i'm stuck in what I thought would be an easy step. When using UnityEditor.GetWindow(), the window doesn't open in the main tab but as a separate Window. The scene view is not attached to the main Unity window.

I've tried a few workarounds but none seem to work:

  • First I tried to use the desiredDockNextTo parameter from the API, but I keep getting an error i'm not able to fix.

      Type inspWndType = typeof(Editor).Assembly.GetType("UnityEditor.SceneView");
    
     EditorWindow[] allWindows = Resources.FindObjectsOfTypeAll<EditorWindow>();
     Type[] insWindTypeList = new Type[allWindows.Length];
     for(int i = 0; i < allWindows.Length; i++)
     {
         insWindTypeList[i] = allWindows[i].GetType();
     }
     var window = EditorWindow.GetWindow<typeof(inspWndType)>(insWindTypeList);
    

I keep getting an error in <typeof(inspWndType)> saying that it's a variable instead of a type (I also tried with inspWndType.gettype or casting it, nothing worked).

  • Also tried using Jayatubi's Docker and it didn't work either.

TLDR: I want to be able to create a window using EditorWindow.GetWindow() and dock it from a script.

Thank you to anyone that could help me with this.

over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!