Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

444
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda