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
- Tooltip messages should be presented in human language not in code strings
- [Linux] Editor doesn’t auto reload when an Asset is imported or a Script is changed
- MouseDownEvent is triggered when changing from Scene view to Game view
- "GlobalObjectIdentifierToObjectSlow" returns Null when retrieving "GlobalObjectId" from GameObject inside a Prefab
- Shader is invisible in the Build when using BiRP on Meta Quest 2
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.