gp
New Member
Posts: 5
Posts: 5
|
Post by gp on Feb 24, 2016 10:38:16 GMT
Hi all,
when I start game I get this error
Failed to create agent because it is not close enough to the NavMesh UnityEngine.Object:Instantiate(Object, Vector3, Quaternion) DarkTonic.CoreGameKit.PoolBoss:InstantiateForPool(Transform, Int32) (at Assets/Plugins/DarkTonic/CoreGameKit/Scripts/PoolBoss/PoolBoss.cs:169) DarkTonic.CoreGameKit.PoolBoss:Initialize() (at Assets/Plugins/DarkTonic/CoreGameKit/Scripts/PoolBoss/PoolBoss.cs:143) DarkTonic.CoreGameKit.PoolBoss:Awake() (at Assets/Plugins/DarkTonic/CoreGameKit/Scripts/PoolBoss/PoolBoss.cs:111)
Some suggestions?
Thank you Guido
|
|
|
Post by DarkTonic Dev on Feb 24, 2016 16:53:39 GMT
That should have only to do with the position you're spawning in. As the error says, it's not close enough to the NavMesh. You would get the same error if you Instantiated and weren't using our plugin. If you can't figure it out, I would have you post on the normal Unity forum. I haven't used NavMesh stuff before, as it's far inferior to other plugins that do the same thing (that's what I hear anyway).
|
|
gp
New Member
Posts: 5
Posts: 5
|
Post by gp on Feb 24, 2016 16:56:08 GMT
That should have only to do with the position you're spawning in. As the error says, it's not close enough to the NavMesh. You would get the same error if you Instantiated and weren't using our plugin. If you can't figure it out, I would have you post on the normal Unity forum. I haven't used NavMesh stuff before, as it's far inferior to other plugins that do the same thing (that's what I hear anyway). It can be the Pool Boss gameobject? As the spawners are inside navmesh
|
|
|
Post by DarkTonic Dev on Feb 24, 2016 17:04:30 GMT
You probably will need to disable the NavMesh agent and enable it when it's spawned (with OnSpawned method code). That should fix the error.
|
|
gp
New Member
Posts: 5
Posts: 5
|
Post by gp on Feb 24, 2016 17:10:38 GMT
You probably will need to disable the NavMesh agent and enable it when it's spawned (with OnSpawned method code). That should fix the error. Ok thank you very much...On spawned methos is on spawn prefab, right?
|
|
|
Post by DarkTonic Dev on Feb 24, 2016 20:15:00 GMT
Yes.
|
|
|
Post by DarkTonic Dev on Feb 25, 2016 2:10:46 GMT
By the way, I've added this to PoolBoss to automatically enable NavMeshAgent components on the prefab top-level whenever it's soawned. For the next version.
|
|