I would like to connect my Unity UI elements with Global Blackboard, but somehow I can’t find any easy solution for that.
Example:
I have an InputField. When User change value in InputField then corresponding variable in GlobalBB should also change.
Unfortunately standard OnValuChange doesn’t find GlobalBB variables.
Possible solutions:
1. Create custom class with all variables binded to GlobalBB – However it makes GlobalBB pretty useless at completely negligible.
2. Create helper script with proper function to change every GlobalBB variable. This is a little different approach, but still I need a custom script with proper (hard coded) function for every variable.
I wonder if there is any simple solution that doesn’t require to “code” every variable, because something I really like in BBs is that I can create variables straight from the Inspector.
Unfortunately the thing is that Unity Events in the inspector, only support methods with only one parameter, but to set a variable on the blackboard, naturally two parameters are required. One for name and one for value.
Thus, the only real solution here, is indeed #2, even though it is of course not ideal, but I can’t really think of any way to bypass the limitation of one parameter that Unity Events support in the inspector. :/
If you have something to suggest of course, I’m glad to hear it 🙂
Thanks!
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.