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

320
Vistas
Instantiate doesn't work in unity with navmesh

I'm having some problems on instantiating an enemy in unity, it gives me always this error setDestination" can only be called on an active agent that has been placed on a NavMesh., and then it places a 2d model somewhere in my map

    public GameObject enemy;
    public Transform spawn;
    // Start is called before the first frame update
    void Start()
    {
        spawnNew();
    }
    void spawnNew() {

        Instantiate(enemy, spawn.transform.position, Quaternion.identity);
        
    }
over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

After you have spawned an enemy, call the NavMeshAgent.Warp() function to position the agent on the desired position, which of course must be inside the navmesh.

over 4 years ago · Santiago Trujillo Denunciar
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