Hi there, just found a bug in our project, if you set the [FirstActivation] attribute to [OnEnable] and call FlowScriptController.StartBehaviour() during Awake(), you will get two duplicated graph instances, one in the GetInstance() and one in Initialize(). Both instances will react to the events you sent via flowscript controller, like a single SHOOT evt will spawn two bullets. It can be fixed by call Initialize() in the beginning of GraphOwner.StartBehaviour().
Hmm. Why do you manually call StartGraph in Awake since the graph is going to be automatically started anyway since FirstActivation is set OnEnable? If you don’t want to auto start the graph, you can set FirstActivation to DoNothing. 🙂
Your fix looks correct by the way in case you have to call StartGraph manually.
Let me know.
Thanks!
Join us on Discord: https://discord.gg/97q2Rjh
Author
Posts
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic.
Login
Register
By registering on this website you agree to our Privacy Policy.