The difference of SetValue node in blackboard

I created a service BP in the behavior tree, wrote a value to the blackboard.

check the value immediately after the SetValue node. It was not a legal value.

I tried another means. With this method, you can retrieve the legal value.

What are these differences?

SetValue is fail.

SetValue is success.

Did u select a blackboard key on your service in the bt for the TargetDistance-Keyselector?

Yes. TargetDistance is selected the Blackboard KeySelector.

I made a test Service like this ,it worked.

I think you can try this:

  1. make a simple service like this and check the result.If the result is right.
  2. set a break point in C++ code and see the result of GetBlackboard(),check the value is nullptr,
  3. Agree with ,I still think the problem is your key selector

God of Pen

Isolved.

It is a very trivial matter.

Blackboard KeySelector will not work unless you set the Default as shown in the figure.