…\Private\EnemyAIController.cpp(196): warning C4996: ‘UBlackboardComponent::SetValueAsObject’: This function is deprecated. Please use SetValue() instead. Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile.
…\Private\EnemyAIController.cpp(342): warning C4996: ‘UBlackboardComponent::GetValueAsObject’: This function is deprecated. Please use GetValue() instead. Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile.
its my code
You should be able to simply remove the “AsObject” from your function calls. The values passed in and returned are of the same type as previous so you should get the same result as you did before. What exactly do you mean by it does not work?
Looking at the BlackboardComponent.h file, the call you would want to make would be SetValue(KeyID, “ObjectValue”). The pieces inside the quotes would change depending on the datatype being used (_Vector && VectorValue / _Bool && BoolValue / etc.)
Inside the brackets you want to have UBlackboardKeyType_Object. If you are trying to use a type other than Object, then you would change what is after underscore (_) to the appropriate type (such as Vector or Bool).