Search Issue Tracker
By Design
Votes
1
Found in
5.4.0b13
Issue ID
788816
Regression
No
Custom Editor does not serialize UnityEvent parameters when using SerializedObject
Steps to reproduce:
1. Open attached project
2. Open scene "Scene"
3. Select the "Events" object in the hierarchy
4. Add a new event or just click the "+" to add an action to an existing one
5. Add some object (for example the Main Camera)
6. Select a function (for example GameObject.SetActive)
7. Change the default parameter to something else (in the above case, check the checkbox)
8. Select another object from the hierarchy (for example Main Camera)
9. Then select the "Events" object again
10. The checkbox has been reverted to it's default state
Reproduced with: 5.2.4f1, 5.3.4f1, 5.4.0b15
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
- [WebGL][Android] Corrupt header when connecting via IP
- Editor and Android Player hangs/freezes when repeatedly Loading/Unloading AssetBundle in Vulkan
- Selecting a Material for HDRP Decal Projector in the Inspector window spams errors in the Console
- Expanded Asset Preview Box moves/hides when creating new Asset in Project window
- Player crashes on Meta Quest with "/apex/com.android/runtime/lib64/bionic/libc.so" when using OpenXR Plugin in a specific project
Resolution Note:
The problem is that the user is creating a new SerializedObject representation for each of the ScriptableObjects in every phase of the IMGUI loop in the MyComponent editor. For example, if the user adds [CreateAssetMenu] attribute to the MyScriptableObject class and simply creates one in the project, the problem does not appear to exist for that individual asset. Instead, the user should cache the SerializedObject values for each of the ScriptableObjects, and the problem seems to go away.