Search Unity

Can I move an NPC using a dynamic NavMesh prefab data?

Discussion in 'Scripting' started by Shiina011, Jun 9, 2021.

  1. Shiina011

    Shiina011

    Joined:
    Oct 1, 2020
    Posts:
    46
    So here's my current game:
    Let's say I have Scene A, Scene B, and Scene C, and PersistentScene.

    PersistentScene is a blank scene that contains player, NPCs, and all other data.
    Other scenes loaded additively if the player enter those scenes, and unloaded when the player leaves those scenes.

    The player on Scene A, 1 NPC on scene B, and 1 NPC on scene C.
    Scene B and Scene C have pre-baked Navmesh prefab for pathfinding.

    What I'm trying to do is to make the NPCs moving on PersistentScene (the NPCs are invisible, until player enter their scene) using the pre-baked Scene B or C Navmesh prefab.

    Is something like this possible to do? Again, all the NPCs on a blank PersistentScene.