I’m making a function to set graph variables and sub graph variables in runtime.
In order to produce this function, in FSM, I could get the Current State and change the value in runtime, but I couldn’t know how to access sub graph BT inside BT and modify the graph variable. I want get current state at BT like FSM’s current state.
I have already applied the method using PrimeNode, and it works but the value does not change Immediately.
The difference in BT (in comparison to FSM), is that in a BT multiple nodes may run simultaneously due to a Parallel composite and it has no definite states like an FSM has.
You could still however get a BT node from code. I would suggest tagging the nodes you want to get in code with a “tag” in its inspector and then use the graph.GetNodeWithTag<T>(string tag), to get tagged node.
Let me know if this works for your use case.
Join us on Discord: https://discord.gg/97q2Rjh
Author
Posts
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.
Login
Register
By registering on this website you agree to our Privacy Policy.