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
- Physics and Raycast have different behavior when enum is exposed in the Editor
- TextField's text is mixed up and overlapping when "Noto Sans-Display" font is used
- TutorialManager Warnings are thrown when creating Test Track, LEGO or 2D Platform microgame template projects
- Incorrect ScrollToItem behavior when called on a deattached ListView
- Zooming in/out in Scene View window on the display the zoom takes place in does not work
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.