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
- [Vulkan] Crash on with multiple stack traces when rendering large Terrain with specific hardware
- Crash on SkinnedMeshRendererManager when interacting with a prefab generated with uncombined meshes using Synty Sidekick Character Creator
- Crash on folly::detail::safe_assert_terminate_v when updating the Meta XR SDK Packages
- The text font falls back on a different font depending on the fallback font used
- Template is opened in Isolation when opening it in Context and users Save the UI Document when prompted to do so in UI Builder
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.