Search Issue Tracker
Fixed in 2022.3.5f1
Fixed in 2023.2.0a22
Votes
0
Found in
2022.3.2f1
2023.1.1f1
2023.2.0a20
Issue ID
UUM-40831
Regression
Yes
When building a project while a modified Prefab is open, the FileID of the corresponding prefab changes, thus breaking the reference to it from the Scene
Steps to reproduce:
1. Open the attached user's project "ScenePrefabKill.zip"
2. Open the scene called "Test"
3. Hit Ctrl+B to perform a default Windows Standalone build, select a directory to save the build. Once application has launched, hit Alt+F4 to terminate it. Go back to the Editor
4. In the Test scene, select the "SceneScripts" GameObject to look at it in the inspector. Make sure its "Spawn Fab" is set to reference "BoringPrefab"
5. Click on the prefab reference to highlight "BoringPrefab" in your Project Window and open it
6. Drag "HeavyPrefab" from Project Window into the Scene Hierarchy of "BoringPrefab"
7. Without exiting BoringPrefab, hit Ctrl+B to make a build and run it from within the prefab stage
7.1. At this point, depending on the timing, even with Auto Save selected, Unity may or may not ask you to save your changes. If it does ask you, click Save
8. Terminate the application once it launches
9. In the Editor double-click "BoringPrefab" in the Project Window to edit it
10. Select "HeavyPrefab" GameObject and delete it
11. Exit the Prefab view and click on the "SceneScript" GameObject, observe the Spawn Fab reference in the Inspector: it is now "Missing (Game Object)"
Expected results: When building a project while a modified prefab is open the reference to it from the Scene is not lost
Actual results: When building a project while a modified Prefab is open, the FileID of the corresponding prefab changes, thus breaking the reference to it from the Scene
Reproducible on: 2022.2.7f1, 2022.3.2f1, 2023.1.1f1, 2023.2.0a20
Not reproducible on: 2021.3.27f1, 2022.2.6f1
Environment Tested on: Windows 10
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
- [Tile Palette] Sprites not rendering when brush tool "Paint a filled box with active brush" is used for the first time
- Adding available Nodes with longer names in Fragment Context window overflow Fragment Context window in Shader Graph
- "Layer Palette Profile" Asset is automatically applied to the second Terrain but doesn't load any layers
- "Terrain Tools" shortcut conflicts with the Overlays shortcut by default
- Longer Shader Graph Property Reference names breaks VFX Graph Output Particle Node
Resolution Note (fix version 2022.3.5f1):
Fixed by https://issuetracker.unity3d.com/product/unity/issues/guid/UUM-39802
Resolution Note (fix version 2023.2.0a22):
Fixed by https://issuetracker.unity3d.com/product/unity/issues/guid/UUM-39802