Here is a idea for a simple way to make blackboards much more manageable. I’m planning on seeing if I can implement this myself, but figured getting the actual Dev’s opinion could be helpful.
Problem: Blackboards are very clunky. Since graphs don’t depend on any specific blackboard, this allows for a single character holding a blackboard can run as many different Graphs as it wants. However, this means adding/removing values from a blackboard requires it to be done on the character level: aka selecting a specific instance of a Graph.
I’m thinking we could keep this exactly as it is, but add another optional feature: graphBlackboard. This is an asset that is tied directly to a Graph. You can add or remove values from it. And then, when a character runs the graph, it will automatically fill the character’s blackboard with the graphBlackboard’s values. (And will have to throw an error if an identical key is found). This means that if it runs many different graphs, it will still end up with all the variables it needs, but it also means the “required variables” are defined on the Graph level, as opposed to the character/gameobject level.
Sorry for the late reply in this, but it seems I’ve missed your post completely.
Local Graph Blackboards is indeed something I’ve been looking to implement a very long time now in one way or another. So long that it has become what nested prefabs is for Unity if you know what I mean 🙂
Actually, code wise, graphs already have and support a local graph blackboard that is already serialized alongside with them (in the same asset), but the functionality is not exposed in the editor to be used somehow (which is of course what needs to be done now).
One idea I was rather investigating, was to instead of automatically filling the Owner’s Blackboard variables based on the Graph’s Local Blackboard, to instead parametrize/map the Graph’s Local Blackboard variables FROM the Owner’s Blackboard variables. As such, naming would not matter and each Owner would be able to map the assigned graph’s variables differently based on it’s own variables (just like passing the graph some parameters).
This is actually something that is already done for Dialogue Trees and SubDialogue Trees (they use Local Graph Blackboard able to parametrize by parent Dialogue Tree blackboard), but unfortunately not yet for BTs and FSMs. The only thing that actually keeps me back from implementing this feature to BTs and FSMs as well the way I would ideally want it to, is that is really hard to make it so that projects previously made without using this feature, still work the same, which is of course a big concern to take into account.
Having said that, Local Graph Blackboards is something I do want to implement correctly and wont’ rest until I finally do one way or another 🙂
I will also think a bit more about your suggestion and whether doing this automatically by name the way you describe solves the problem I am currently facing.
Thank you!