Search Issue Tracker
Fixed
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
- Crash on ScheduleGenerateTilingShape when modifying PolygonCollider2D path count and setting path vertices
- Crash when a scene is created with LocalPhysicsMode::Physics3D
- [HDRP] Light doesn't bounce off terrains
- Unity Hub opens instead of the Unity Editor when launching a project from a Windows command line if a backslash is added to the end of the project path
- "ParseErrorException" is thrown when parsing a float with a very small value from JSON
Resolution Note:
Fixed by https://issuetracker.unity3d.com/product/unity/issues/guid/UUM-39802