Search Issue Tracker
Won't Fix
Votes
0
Found in
2019.4
2020.3
2021.2
2022.1
2022.1.0a13
Issue ID
1380849
Regression
No
Objects marked as DontDestroyOnLoad get destroyed when built
Reproduction steps:
1. Open attached project "1380849.zip"
2. Open Scene "ReproScene"
3. Enter Play Mode
4. Observe Game view
5. Build and run Scene "ReproScene"
6. Observe Scene in build
Expected result: Numbers are visible in Scene
Actual result: Numbers are not visible in Scene
Reproducible with: 2019.4.33f1, 2020.3.23f1, 2021.2.4f1, 2022.1.0a16
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
- Crash on PrepareDrawShadowsCommandStep1 when entering the Play Mode in a specific project
- Physics Layer Collision Matrix's Layer names, checkboxes and hover highlights become misaligned when the Editor's UI Scaling gets changed
- Light/shadow information on an edge of a Terrain tile creates a seam with an adjacent Terrain tile when baking a LightMap
- "Missing types referenced from component UniversalRenderPipelineGlobalSettings on game object UniversalRenderPipelineGlobalSettings..." warning is thrown after switching the Platform to tvOS
- “Metal: Error creating pipeline state (Universal Render Pipeline/2D/Sprite-Lit-Default): Vertex attribute BLENDINDICES0(5) of type uint4 cannot be read using MTLAttributeFormatFloat2 (null)“ when setting GPU Skinning to GPU after opening the project
Resolution Note:
When the Player loads first scene it clears DontDestroyOnLoadObjects. This behavior is very old (At least from 2015 since ClearDontDestroyOnLoadScene name exists) and changing it might affect existing projects.
If one wants to create DontDestroyOnLoadObjects they must be created after the first scene is loaded.