Hi,
Just a simple event from the AnyState. Note: I do Destroy the FSM owning object last thing in the finish callback.
Doesn’t appear to be any version info in the readme. I downloaded it about a month ago – think it’s v2.6.3
We have a gameobject in the scene with blackboard and FSM asset assigned to it. I can run the FSM once from code to its end all OK. Re-starting it later doesn’t work (I’m assuming it has previous state that’s interfering, e.g. the graph view shows two green active nodes…)
Instantiating a prefab instead works ok for the first run again. Re-instantiating lets me start the FSM again, it does its first action tasks, then the owner and blackboard get ‘nulled’ in the code (i.e. Unity’s dodgy null ref overloading for destroyed objects).
I breakpointed all the Destroy fns I could find but none were hit!
The only ‘destructive’ action I have is a ForceFinishGraph call in the last state node – no destroy calls anywhere.
aaaand we found the problem: The prefab had both FSM Owner (valid FSM set) and a BT Owner (no tree set) component.
Removing the empty BTO component sorted it.
Author
Posts
Viewing 7 posts - 1 through 7 (of 7 total)
Login
Register
By registering on this website you agree to our Privacy Policy.