Search Issue Tracker
By Design
Votes
0
Found in
2018.3.0a6
2018.3.0b3
Issue ID
1085008
Regression
Yes
Unable to attach scripts to Prefabs created with Unity 5.4 and earlier
Steps:
1. Open attached project ("New Unity Project (19).zip")
2. Select Prefab "54" (or "53", or "52"). Note: these Prefabs were created with Unity 5.4, 5.3 and 5.2
3. Add "Master.cs" to a Missing script field
4. Enter Scene window. Notice: a window appears asking if you want to save changes to a Prefab
5. Click Yes
Expected: changes to Prefab are saved - Prefab gets script attached.
Actual: changes to Prefab are not saved - Prefab still misses a reference to a script.
Reproduced with: 2018.3.0a6, 2018.3.0b3, 2019.1.0a2.
Not reproduced with: 2017.4.11f1, 2018.1.9f2, 2018.2.8f1, 2018.3.0a5.
Note: the bug appeared with the introduction of Nested Prefabs.
BY DESIGN: Prefabs can not be saved with missing scripts. In this case, a missing script was in a prefab's child and prevent it from being saved. in addition, an error in Console was shown:
You are trying to replace or create a Prefab from the instance 'Sub Object' that references a missing script. This is not allowed.
Please change the script or remove it from the GameObject.
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
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
- Unity CIL Linker fails on Player build when persistent listeners have "<" and ">" in their XML attribute names
- ”Lighting data asset ‘LightingData’ is incompatible with the current Unity version…” warnings are thrown when saving Indoors (URP) and Outdoors (URP) Scenes as Scene Templates
- [iOS] The screen blinks when transitioning from custom to Unity splash screen
- [macOS] ”Ignoring depth surface load action as it is memoryless” warnings are thrown when taking Game View Snapshot
- UI Builder Inspector scrolls back up when changes on an expanded but not fully displayed Inspector tab are saved
Resolution Note:
BY DESIGN: Prefabs can not be saved with missing scripts. In this case, a missing script was in a prefab's child and prevent it from being saved. in addition, an error in Console was shown:
You are trying to replace or create a Prefab from the instance 'Sub Object' that references a missing script. This is not allowed.
Please change the script or remove it from the GameObject.
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)