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
- Highlights persist throughout Options Panels in the Rendering Debugger Window
- Typing numbers in Matrix node’s numeric fields stretches Node
- Project Browser Icons use the wrong Theme and Users are not shown any indication that process will be deferred when switching Editor Theme in Play Mode
- Streaming is misspelled as "Steaming" in "Enable GPU Streaming" and "Enable Disk Streaming" tooltpis
- "IndexOutOfRangeException" thrown when moving caret left at start of TMP Input Field with rich text
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.