Reply To: Get Blackboard by name?

NodeCanvas Forums Support Get Blackboard by name? Reply To: Get Blackboard by name?

#12379
Gavalakis
Keymaster

Hello!

Thanks for your positive feedback. I am very glad you like NodeCanvas!

Even though multiple Blackboard components can be added on the same gameobject, it is really something I wouldn’t recommend doing, since by design NodeCanvas is made so that multiple GraphOwners (BTOwner, FSMOwner) attached on the same gameobject share the same Blackboard attached on that same gameobject and as such having one Blackboard attached is recommended for that reason.
I have previously thought of adding [DisallowMultipleComponent] attribute to Blackboard class for the above reason, but never really did so 🙂

In any case, Blackboard.cs do have a name property which -as you said- points out to BlackboardSource.name property, and while you can set that name in script, it is not exposed in the inspector. You can if you want however, open up BlackboardInspector.cs file and add the following line of code to expose and thus edit the name in the inspector:

Changing the name like so will not break anything at all. 🙂

Let me know if that works for you.
Thanks again!

Join us on Discord: https://discord.gg/97q2Rjh