Search Issue Tracker
Won't Fix
Votes
0
Found in
2018.3.6f1
2019.1.0a1
2019.1.0b7
2019.2.0a1
Issue ID
1141950
Regression
No
Reference lost when Camera.main is called in the Prefab Mode
Steps to reproduce:
1. Open Project "CameraNullRef"
2. Enter the Prefab Mode for "prefab1"
3. prefab1 contains Main Camera, but can not address it
Expected result: Since Camera.main can be added to a Prefab, it should maintain it's reference
Actual result: Reference lost when Camera.main is called in the Prefab Mode
Reproducible with: 2018.3.12f1, 2019.1.0b10, 2019.2.0a11
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Articulation Body with 'Revolute' Joint Type has erratic behavior when Upper Limit is set to above 360
- WebGL Player fails to render Scene when Terrain with Detail Mesh is added and WebGPU Graphics API is used
- Inconsistent errors are logged when different types are passed into the Query "Q<>" method in UIToolkit and the ancestor VisualElement is null
- Crash on GetMaterialPropertyByIndex when opening a specific Scene
- Discrepancies in the styling are present when using a TSS file instead of a USS file in custom EditorWindow
Resolution Note (2019.3.X):
With static API like that we have to assume it being runtime api. The apis where a GameObject is provided we can check what stage it is in and adjust searching to that stage. But since Camera.main is static we always only check the users scenes and not Editor PreviewScenes