I see that you can reference flowscripts using get component. But I only see how that works with 1 flowscript on a game object. If you have multiple flowscript controllers on the same object and you want to keep them disabled and enable them as needed (like ai behaviors) there doesn’t seem to be a way to individually reference them since they aren’t named, only the flowscript inside is… Maybe this is not worth it anyway? And I should leave them all enabled since for me they are all event based anyway?
An enabled flowscript does not really consume any resources unless it is actually doing something. So if that is the reason you want them disabled then there is no need to really. If on the other hand you really want to disable some of them, you can use GetComponents<FlowScriptController>() to get them all and then iterate the result array to selectively disable/enable some or all of them. You could do the selection based on the name of the graph (flowScriptController.graph), but thinking of this it might actually be a good idea for me to add an identifier name in FlowScriptController for such reasons. 🙂
Thank you for that last sentence there! I had been thinking of that suggestion. First, I brought this up because the editor was slowing with large graphs and I was trying different things after I split up my main graph into multiple scripts (which is better anyway). But I realized its not actually an issue if you select some other game object. I found elsewhere here that it has to do with Unity onBeforeSerialize every frame… harder to search for… Anyway, naming of some type for the FlowScript Controllers would be great for organization! I was also pondering if when minimized, it could only minimize to the bottom of the comment section because I have been using that for finding what I want. Thank you.
Flow Canvas is awesome. I got node canvas and don’t like switching thinking to within how the trees work so far (maybe till I get to dialogue), but using the task actions within my flow scripts is great!
Hello again and thank you for your positive feedback. I am glad you like FlowCanvas 🙂
No problem, I will add an identifier name to GraphOwners for this purpose. Regarding minimize, I unfortunately can’t control Unity minimize functions. It either shows or hides everything 🙂
Join us on Discord: https://discord.gg/97q2Rjh
Author
Posts
Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic.
Login
Register
By registering on this website you agree to our Privacy Policy.