Can't set gameobject variable in variable panel, keeps clearing back to null

mostlyhuman

Member
I have an npc character prefab with a behavior tree on it and the tree has a variable (in the variable panel) called Player which is of type GameObject, i will click the circle to select the Player object in my scene but then it immediately disappears or sometimes it will stay but as soon as I close the prefab it disappears and will still be set back to null when I reopen the prefab. I have also tried setting it outside of the npc prefab (with the prefab closed) with the same result. I tried closing and reopening unity as well as deleting the variable and recreating it not sure why its doing this. and just to clarify this is not during runtime. Also a second question, is BD setup to only allow editing of a behavior tree on a prefab when the prefab is open?bdVariableIssue.png
 
Last edited:
Top