I have a navmesh in game and I want my player spawnet using NewtworkManager to be controlled using NavMesh agent.
I have followed following:
- Added a new game object to the scene and rename it to “NetworkManager”.
- Added the NetworkManager component to the new game object.
- Added the NetworkManagerHUD component to the game object.
- Created the Player prefab. The player prefab has a navmesh agent attached.
- Added Networkidentity component to player prefab.
- Added NetworkTransform to player prefab.
- Check the LocalPlayerAuthority box on the NetworkIdentity.
- Set the playerPrefab in the “Spawn Info” section on the NetworkManager to the player prefab
- Remove the player object instance from the scene if it exists in the scene
After this my NavMesh agent script is being called but if I try to access any variables or fucntion on NavMesh agent, I get an error "
“can only be called on an active agent that has been placed on a NavMesh.”
I did rebake my NavMesh. How do I make this work?
Thanks,
Rishi