Search Issue Tracker
By Design
Votes
0
Found in
2018.4
2020.1.1f1
2020.2
Issue ID
1270742
Regression
No
Prefab's instance gets referenced instead of the original Prefab if the Prefab's editing window is opened
How to reproduce:
1. Open the user's attached "PrefabBug.zip" project
2. Open the "SampleScene" Scene
3. Create an empty GameObject in the Hierarchy window
4. Select the newly created GameObject
5. Add the "ScriptWithPrefabRef.cs" script to the GameObject
6. Drag the GameObject from the Hierarchy window to the Project window to create a Prefab
7. Select the GameObject in the Hierarchy window
8. Press ">" in the Hierarchy window to go to the Prefab editing window
9. Drag the created Prefab into the "Test Prefab" field in the Inspector
10. Exit the Prefab editing window
11. Select the referenced object in the "Test Prefab" field in the Inspector
Expected result: The Prefab gets referenced in the "Test Prefab" field
Actual result: The Prefab's instance in the Scene gets referenced in the "Test Prefab" field instead of the original Prefab
Reproducible with: 2018.4.26f1, 2019.4.8f1, 2020.1.3f1, 2020.2.0a21
Note:
- In the user's project, SerializeReference attribute is used on the "Test Prefab" field, but it also reproducible without any attributes
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
- Mono Windows Builds don't produce full log callstacks when generating logs
- AssetBundles fail to load when running in Built Players for Mobile Devices
- UI elements with text gets bigger and grey when Player window is moved to another screen with different resolution
- System name accepts multiline text but crops it on confirmation, duplicates input, and shrinks the field when empty
- UI element scale and position are wrong in project build when DRS is changed with HDR and Software Dynamic Resolution enabled
Resolution Note:
This is by design. 1. An asset reference is simply a reference to the root object of the asset. 2. When prefabs are instantiated, all internal references are mapped to the instance objects during instantiation.