Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

439
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda