- A* version: 5.4.6
- Unity version: 6.3.8f1
Hey there! I’m getting an error message while using the FollowerEntity component, when the domain wasn’t reloaded before the current play mode session. Which happens almost all the time, since my “Project Settings>Editor>When entering Play Mode” is set to “Do not reload Domain or Scene”. Here are the 1st two lines of the error :
“InvalidOperationException: Entity does not exist. You can only access this if the component is active and enabled.
Pathfinding.ECS.FollowerEntityProxy.AssertEntityExists () (at ./Packages/com.arongranberg.astar/Core/AI/FollowerEntityProxy.cs:127)”
I’m calling this code from a very simple function that executes on mouse left click, which sets the IAstarAI.destination to the mouse position on screen. I don’t get any error when using this right after a domain reload (i.e. after script compiling).
My guess is it has something to do with some static member that does not get reset before each Play Mode? In any case, is there a way to fix this other than forcing domain reload on every Play Mode session?
(This being said, the error does not seem to stop the component from doing its job, as my agent still moves toward its destination. But I am cautious about unexpected behavior down the line if I don’t fix this…
)