Search Issue Tracker
By Design
Votes
0
Found in
2018.3.0a6
2018.3.0b1
Issue ID
1082565
Regression
Yes
SerializedProperty.PropertyField is not editable in an EditorWindow when it is used for a Prefab Script field
How to reproduce:
1. Open the attached "TestFor1082565.zip" project
2. In the top menu bar click Test -> My Window
3. In the recently opened window notice that the check box is greyed out
Expected result: Serialized field is editable
Actual result: Serialized field is not editable
Reproducible with: 2018.3.0a6, 2018.3.0b2, 2019.1.0a1
Not reproducible with: 2017.2.3p4, 2017.4.11f1, 2018.2.9f1, 2018.3.0a5
Note: Opening the project on the affected versions corrupts it and then the issue is reproducible across all the versions
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
- "Shader warning in 'Hidden/Light2D': implicit truncation of vector type" is thrown when building Universal 2D template
- AI Assistant breaks compilation of packages using System.Runtime.CompilerServices.Unsafe via auto-referencing
- Unity Hub checks the "Documentation" module by default on the 6.4 and 6.5 streams despite that it was unchecked with the previous installs
- Shortcut that toggles between Dopesheet and Curves Views in the Animation Window's Timeline is mislabed
- Property List Items Overlap onto the Property List's top edge when scrolling through a long Property List
Resolution Note (2018.3.X):
Since the behaviour of Prefabs changed, there are new APIs that the user will need to rely on.
The APIs are:
PrefabUtility.LoadPrefabContents and PrefabUtility.SaveAsPrefab
In his example, this can be modified to calling
PrefabUtility.LoadPrefabContents inside the Init() function,
and calling PrefabUtility.SaveAsPrefab if the call to so.ApplyModifiedProperties() is successful.
Refer to reply for sample code change.