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

227
Visualizações
Assembly definition can't resolve namespaces from external packages

I created a new project with Unity. In the project settings I set the field Root namespace to Assets.

I'm using the external package Entitas-Redux by installing it via Git url. In the code I will then have access to additional classes from the Entitas-Redux namespace.

I want to create unit tests for my scripts located in the Scripts folder, so I created a "Tests Assembly Folder" from the context menu. The current folder structure is

enter image description here

I get a warning that it couldn't find any test. So I have to tell the assembly definition ScriptTests where to search for the scripts.

That's why I added another assembly definition

enter image description here

Now I can associate the scripts assembly definition with the scripttests assembly definition. The problem is that the scripts assembly definition can't find the external package namespace anymore

enter image description here

How to fix this?

Should I remove the scripts assembly definition and add the scripts located in the scripts folder with another approach?

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

Your test asm can only test scripts that are in asm themselves.

I would suggest to move the test folder up to Assets so there is no collusion.

Then, looking at your hierarchy, you could add an asm to Sources. At that point if anything in Sources is using code outside of it, you'll have to add the assembly reference to the asm for that module.

Finally, you add Sources.asm to the test asm and your code is visible to the test.

over 4 years ago · Santiago Trujillo Relatório
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