Search Issue Tracker

Fixed in 10.1.0

Fixed in 7.5.2, 8.3.1

Votes

0

Found in [Package]

7.3.1

Issue ID

1252263

Regression

No

[Universal RP] MissingReferenceException errors when removing missing camera from stack

Package: Scriptable Render Pipeline Universal

-

Steps to repro:
1. open a new universalRP
2. add a new camera, set the type to overlay
3. add your new camera to Main Camera > stack (add twice)
4. add another camera, set the type to overlay
5. add the second new camera to the stack (add one time)

you should have 3 entries in the stack now

4. in hierarchy, delete the new camera game object
5. observe the first error
6. In inspector, remove both "Missing Camera" from the Main Camera > Stack
7. observe the second error

Expected: missing camera is not invoked
Actual: missing camera is invoked causing MissingReferenceException

repro: 2019.3.15f1 + URP 7.3.1

Notes:
- does not repro with only 1 "Missing Camera" in the stack
- does not repro with 2 "Missing camera" and no other camera in the stack
- error at step 5: MissingReferenceException: The object of type 'Camera' has been destroyed but you are still trying to access it.
- error at step 7: MissingReferenceException: The variable m_Cameras of UniversalAdditionalCameraData doesn't exist anymore.

  1. Resolution Note (fix version 10.1.0):

    Fixed and is now removing missing cameras from camera stacks when viewing base camera or running the project.

Comments (6)

  1. TripTrapTechTrap

    Nov 19, 2022 22:52

    Still present in 2022.1.22f1

  2. stroibot

    Oct 31, 2022 14:49

    2022.1.17f1 present

  3. KuARzi

    Oct 18, 2022 03:37

    It is still present in Unity 2022.1.20f1.

  4. BigToe

    Oct 16, 2022 19:11

    This happens if I enter play with a prefab scene in edit mode. I have an editor button that forces a script reload which fixes it temporarily.
    EditorUtility.RequestScriptReload();

    If I close the prefab editing window and play, I do not get the error.

    Unity 2022.1.18f on an M1 Mac

  5. ETGgames

    Oct 07, 2022 01:01

    I'm literally getting this so much now. please fix it. on m1 mac.

  6. FaberVi

    Aug 05, 2022 08:43

    Still present in Unity 2022.1.11f1.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.