I get this exception error when I stop play in Unity Editor.
Exception: Could not remove RecastMeshObj from tree even though it should exist in it. Has the object moved without being marked as dynamic?
Pathfinding.RecastMeshObj.OnDisable () (at Assets/AstarPathfindingProject/Generators/Utilities/RecastMeshObj.cs:178)
I have to say I am using a bit of older version of Astar as I need to run it under Unity 4.3
What is correct way to prevent this from happening… ? If this is fixed in the recent build, is it possible to bring in that changes to the version that I have.? (which is PathfindingProject_Pro_WebsiteDownload_isometric I believe)
I think the error message says it quite clearly.
It will log that error message if the object has been moved without the “dynamic” field being enabled on the RecastMeshObj.
I am instantiating RecastMeshObjs before we call Scan (our levels are procedurally generated) and upon unloading the current scene and loading another I receive this error. I also receive this error simply exiting Play mode. Any assistance would be greatly appreciated.
I see, so this is due to the fact that this component Registers itself in OnEnable which will prevent me from ever establishing that it is dynamic when I create it via script.
It seems that you could take the approach of not doubling your fields there and instead use something like [SerializeField] on your private _dynamic so that you can set it in-Editor and not have a do-nothing exposed field at run-time.