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
- Out-of-bounds memory access with multiple CanvasRenderers under a Canvas when using Mesh API
- Inspector tries to access file after it was deleted when the file was locked in Inspector window
- Changing Transform values in Search window Inspector loses focus while dragging and stopping mouse without releasing dragging action
- Saving changes on the dirty VFX Graph during the Play mode throws "The referenced script (Unknown) on this Behaviour is missing!" warnings
- VFX Graph Debug Info overlaps the "Initialize" block debug info by default
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.