It looks like sometimes unity will link a field in a component on the prefab back to the Prefab asset in the project and not the instance in the scene.
I can mess the with prefab directly in a text editor and get it to switch which of the components point to the asset and which points to the instance. For identical components.
The upshot is there’s no apparent reason why sometimes it might pick the asset over instance. It’s not limited to nested prefabs, it happens when it’s just the prefab in the scene.
When playing the game it will bake it down to the instance correctly only ‘sometimes’ too but that looks to be a different issue.
The only way to make sure it doesn’t happen is to apply the setting as an override value and keep the override (don’t apply to the underlying prefab). This is a pretty critical bug with prefabs in 2019. And again I want to stress this isn’t limited to nested prefabs.
Repro:
Load scene
Select MainCameraFP
Select ‘Main Camera’ field in the first custom pass component to find the target - it will target the prefab instance
Select ‘Main Camera’ field in the second custom pass component to find the target - it will target the prefab asset
