Search Issue Tracker
By Design
Votes
0
Found in
5.4.0b1
Issue ID
760276
Regression
No
Unity API access errors are logged in even in a valid use-case
How to reproduce:
1. Open attached project
2. Select the Editor/SelectMe.asset file in the Project window
- Note the error thrown in the console:
GetAssetPath is not allowed to be called during serialization, call it from Awake or Start instead. Called from script 'TestContainer' on game object 'SelectMe'.
See "Script Serialization" page in the Unity Manual for further details.
UnityEditor.AssetDatabase:GetAssetPath(Object)
TestContainer:OnBeforeSerialize() (at Assets/Editor/TestContainer.cs:9)
UnityEditor.Editor:OnInspectorGUI()
TestWindow:OnInspectorGUI() (at Assets/Editor/TestWindow.cs:7)
UnityEditor.DockArea:OnGUI()
- Reproduced in Version 5.4.0b7 (83df6fa5e23f)
- Not reproducible in Version 5.3.3p1 (828971bd30e1)
- Message doesn't make sense for ScriptableObject since it has no Awake or Start messages.
- By Design: The Unity API is no longer allowed to be called from serialisation under any circumstances and in the future there may be changes to serialisation that make this use case run on a separate thread.
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- RenderPipelineManager.activeRenderPipelineTypeChanged does not detect changes when changing the Render Pipeline Asset outside of Play Mode
- The Scene View becomes gray and "NullReferenceException" errors are thrown when attaching the Unity Editor process to RenderDoc
- Memory usage rapidly rises when changing colors in the color wheel
- Physically Based Sky's Horizon and Zenith Tint Color Selection Bars don't have immediate access to color pickers
- EmptyAdditionalLightShadowmapTexture leaks from memory when URP quality level is changed using QualitySettings.SetQualityLevel
Add comment