In some older posts you had mentioned the possibility of posting an example of how to set property mappings via code. I couldn't find anything in the patch notes or documentation.
Earlier posts mention creating an extension method like this:
but on the line with "InitializePropertyMapping" I get the following error:
Earlier posts mention creating an extension method like this:
Code:
public static void SetPropertyMapping(this BehaviorTree tree, string treeVariableName, string mapping, GameObject owner)
{
var sharedVariable = tree.GetVariable(treeVariableName);
sharedVariable.PropertyMapping = mapping;
sharedVariable.PropertyMappingOwner = owner;
sharedVariable.InitializePropertyMapping(tree.GetBehaviorSource());
}
but on the line with "InitializePropertyMapping" I get the following error: