Unity Behaviour Prefab Override Issue

Hello!

We’re currently evaluating a few different behaviour tree solutions for our game, including Behaviour Designer, Node Canvas, and Unity Behaviour.

I’ve noticed something that appears to be a real spanner in the works for our workflow, however I haven’t really seen anything posted about this on either Unity forums or Opsive forums for Behaviour Designer.

In Unity Behaviour, when a behaviour tree is on an instance of a prefab, any changes to values on the blackboard require the entire blackboard to be reverted to the values on the prefab, and there doesn’t seem to be any option for reverting just individual values in a scene to how they are on a prefab.
E.g. Enemy has some values on its blackboard

  • Patrol points (transforms referenced in scene)
  • Walk speed
  • Run speed

If I change run speed, I don’t have any way of reverting this back to how it was on the prefab other than reverting all of the changes on the prefab, which means I’d lose the references to the patrol points (which are scene references and thus aren’t able to be saved onto a prefab). This problem also appears to be present in Behaviour Designer, however isn’t present in Node Canvas as that allows you to revert individual fields on a blackboard.

Another part of this problem is that now that run speed has been changed, there’s now no way for the prefab to change this overriden value. So someone could modify values for testing purposes, but then there’s no clean way to get the prefab linked to these values again.

This becomes a real issue for us for our workflow of making prefabs, though because I can’t find much info on this, I don’t know if this is just an issue with our workflow and/or if there’s an easy solution to the problem.

Thanks

Hi @FallenPlanetFaz ,

Yes this is a bug we’re hoping to fix asap! Sorry about that :frowning:

Can you please confirm if this is the default Blackboard or a BlackboardAsset to make sure we’re addressing the same case?

Hello @FallenPlanetFaz

Is the following video answering your question?

This is using Unity Behavior but I imagine the workflow being fairly similar in other product.

If not, could you try to provide a video of the issue you are encountering?

Thanks

Hello! Thank you both for the quick reply,

Yes I can confirm that video is the issue I’m talking about. There’s no way to individually revert prefab instance values on a blackboard to be the prefab’s blackboard values, you can only revert the entire blackboard to be the prefab’s blackboard.

I’ve not used a BlackboardAsset for this, this is just using the default Blackboard for the Behaviour Graph.

I believe this is what I am demonstrating in the video:

  • 0:38 - Reverting a single blackboard variable value from a scene instance to be asset’s blackboard value
  • 0:42 - Reverting a single blackboard variable value from a scene instance to be prefab’s blackboard value

I am also using the Blackboard embedded to the BehaviorGraph in this example.
Maybe I am misunderstanding?

In the case at 0:42 with reverting to the prefab value, this is reverting the entire blackboard if I’m understanding correctly, rather than individual values on the blackboard. This is what I feel isn’t expected behaviour and throws a spanner in the works for our prefab workflow. The behaviour I’d like would be to revert individual values, so that value A on a prefab instance blackboard is reverted to be like it is on the prefab, but value B isn’t reverted.

1 Like

Thank you for clarifying!

Yes that makes a lot of sense now and Behavior doesn’t support that feature yet. This is because the Blackboard field is a custom inspector of a single variable.

I will make sure we have a ticket for it. Thanks for raising the issue :slightly_smiling_face:

1 Like

Thanks for the reply!
I hope this feature gets added as I feel it would be very helpful for prefabs, thanks for creating a ticket for it!

1 Like