I see what you are after now. The problem with subgraphs based on a variable, is that since the sub-graph is/can be dynamically assigned, we can’t do the variables mapping since mapping and variables are identified by a unique id instead of their name (so that it’s safe to rename variables without any problems). Of course all variables have their own ID and as such, even if two subgraphs share the same variable name, the mapping will be lost when changing from one subgraph to the other.
One solution would be like you said, to set the mapping via code, but I think that this would become complicated to perform. I could however add some methods if that helps.
Another solution would indeed be to use gameobject variables instead since you want to parametrize the sub-graphs per-agent and since variables mapping feature is not really possible (at least GUI-wise) because you are using different subgraph per agent (as far as I understand). I think that in this case (with dynamic sub-graphs), using the gameobject blackboard is probably better.
If of course you have any other suggestions at all (some kind of feature or ability) that you think can help in what you want to achieve, please let me know.
I also posted another possible solution in my answer in that post. For your convenience I am copy/pasting it for you here:
“I could probably come up with and add a different mapping GUI approach (based on variable name matching) in SubTree inspector in place of the existing one, specifically when the subtree is dynamic. This way we could have the exiting variables mapping method for when the subtree is a constant assignment and a different mapping method for when subtree is dynamic.”
—
Thanks!
Join us on Discord: https://discord.gg/97q2Rjh
Login
Register
By registering on this website you agree to our Privacy Policy.