Double "Universal Additional Camera Data" in single Camera

I keep having this problem. Where a camera that exists in a prefab dropped in the Scene the scene makes an instance of a second Universal Additional Camera Data which cannot be removed this causes the editor “Scene” window to break and not render anything. It also breaks playback gameplay in the editor.


ArgumentNullException: Value cannot be null.
Parameter name: dest
UnityEditor.EditorUtility.CopySerializedIfDifferent (UnityEngine.Object source, UnityEngine.Object dest) (at <dc1a47a5816e4be7bc6817ee4d339e75>:0)
UnityEditorInternal.ComponentUtility.ReplaceComponentsIfDifferent (UnityEngine.GameObject src, UnityEngine.GameObject dst, UnityEditorInternal.ComponentUtility+IsDesiredComponent componentFilter) (at <dc1a47a5816e4be7bc6817ee4d339e75>:0)
UnityEditor.SceneView.UpdateImageEffects (System.Boolean enable) (at <dc1a47a5816e4be7bc6817ee4d339e75>:0)
UnityEditor.SceneView.SetupCamera () (at <dc1a47a5816e4be7bc6817ee4d339e75>:0)
UnityEditor.SceneView.DoOnGUI () (at <dc1a47a5816e4be7bc6817ee4d339e75>:0)
UnityEditor.SceneView.OnSceneGUI () (at <dc1a47a5816e4be7bc6817ee4d339e75>:0)
UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout, UnityEngine.Rect layoutSize, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <0b1cb8f4dac44a9698c79ef2d7b929aa>:0)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <0b1cb8f4dac44a9698c79ef2d7b929aa>:0)
UnityEngine.UIElements.IMGUIContainer.DoIMGUIRepaint () (at <0b1cb8f4dac44a9698c79ef2d7b929aa>:0)
UnityEngine.UIElements.UIR.RenderChainCommand.ExecuteNonDrawMesh (UnityEngine.UIElements.UIR.DrawParams drawParams, System.Single pixelsPerPoint, System.Exception& immediateException) (at <0b1cb8f4dac44a9698c79ef2d7b929aa>:0)
Rethrow as ImmediateModeException
UnityEngine.UIElements.UIR.RenderChain.Render () (at <0b1cb8f4dac44a9698c79ef2d7b929aa>:0)
UnityEngine.UIElements.UIRRepaintUpdater.Update () (at <0b1cb8f4dac44a9698c79ef2d7b929aa>:0)
UnityEngine.UIElements.VisualTreeUpdater.UpdateVisualTreePhase (UnityEngine.UIElements.VisualTreeUpdatePhase phase) (at <0b1cb8f4dac44a9698c79ef2d7b929aa>:0)
UnityEngine.UIElements.Panel.UpdateForRepaint () (at <0b1cb8f4dac44a9698c79ef2d7b929aa>:0)
UnityEngine.UIElements.Panel.Repaint (UnityEngine.Event e) (at <0b1cb8f4dac44a9698c79ef2d7b929aa>:0)
UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at <0b1cb8f4dac44a9698c79ef2d7b929aa>:0)
UnityEngine.UIElements.UIElementsUtility.UnityEngine.UIElements.IUIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& eventHandled) (at <0b1cb8f4dac44a9698c79ef2d7b929aa>:0)
UnityEngine.UIElements.UIEventRegistration.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at <0b1cb8f4dac44a9698c79ef2d7b929aa>:0)
UnityEngine.UIElements.UIEventRegistration+<>c.<.cctor>b__1_2 (System.Int32 i, System.IntPtr ptr) (at <0b1cb8f4dac44a9698c79ef2d7b929aa>:0)
UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& result) (at <9e893022843f45a88085fc45ea2d3f89>:0)

I notice this happens only when the Scene Window is active in the editor. and I play test the game, if I remove the window and start the play test. i don’t get the error.

TEMPORARY SOLUTION: It seems like disabling “Post Processing” from the Scene window (top left icon ‘two layers stacked with a diamond on top’) fixes this bug.

I fixed this inside our project, the solution can be found here: