Blackboard SetValue returns true, but GetValue always returns 0.
I have defined a blackboard data asset in the editor and want to set its value in my GameMode. Then I want to get that value in an AIController that also uses the same data asset.
And the AIController.cpp:
Now whenever I run this, the output looks like this:
The .h files also include the UBlackboardComponent and UBlackboardData, as well as BlackboardKeyType_Int.
So my problem is: how do I set a value to a blackboard I made in the editor and then retrieve it using C++?
asked Jan 31 '17 at 07:19 PM in C++ Programming
This is not how BB assets work. The asset just defines the "shape" of the blackboard, but every BB component has a separate instance of a BB of this "shape". Setting a value in one instance does not affect other instances... unless you mark the given BB key as "synchronized" - if so then any change to it should be propagated to other instances of the same BB asset.
answered Feb 04 '17 at 07:27 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here