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

Asset - Database

-

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)

  1. 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)

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.