Search Issue Tracker
Fixed in 2019.3
Calling AssetDatabase.CreateAsset() inside OnValidate() freezes Unity
Steps to reproduce:
1. Open original project "Bug Recreation.zip"
2. Create an empty GameObject by Right Click inside Hierarchy -> Create Empty
3. Attach the "Assets/BuggyScript.cs" to the empty game object
4. If you want the AssetDatabase.CreateAsset to be called from the script, tick the bool "Freeze Unity".
-observe the freeze-
Reproduced in: 2017.4.30f1, 2018.4.5f1, 2019.1.12f1, 2019.2.0b10
Not reproduced in: 2019.3.0a1
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
- Object references are not loaded after you git checkout to another branch
- Only one of multiple copies of the same StateMachineBehaviour script is visible when added to the Animation state
- [XR][Vulkan][Oculus] Crash in hybrid renderer BeginRenderPass
- [Mobile]Dynamic batching is not working when working with sub mesh on a mobile device
- [Hub] Warning pop-up contains <strong></strong> when attempting to add a project to the list of projects while it's already open