Search Issue Tracker
Fixed
Votes
0
Found in
2018.4
2020.1.2f1
2020.2
Issue ID
1270462
Regression
No
Error is thrown when calling AssetDatabase.DeleteAsset or AssetDatabase.CreateAsset from within the OnSceneGUI function
How to reproduce:
1. Open the attached "OnSceneView_DeleteAsset" project
2. Open the "SampleScene" Scene
3. Make sure that you have the Scene view opened
4. In the Hierarchy select the "Dummy" GameObject
5. In the Inspector press the "Delete Asset" button
Expected results: No errors are thrown in the Console
Actual results: The "The targets array should not be used inside OnSceneGUI or OnPreviewGUI. Use the single target property instead." error is thrown in the Console
Reproducible with: 2018.4.27f1, 2019.4.9f1, 2020.1.4f1, 2020.2.0a11
Not reproducible with: 2020.2.0a12, 2020.2.0b1
Notes:
- The issue has been reproduced on Windows 10 and macOS Catalina 10.15
- The issue is reproducible only if the Editor script has the "[CanEditMultipleObjects]" attribute
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
- Particle System emission ignores the Sprite Atlas when using a Material that has the "Include in Build" setting unchecked
- [Android] [Windows] The frame buffer is replaced incorrectly when using Framebuffer Fetch
- Crash on Scripting::SetCachedPtrOnScriptingWrapper(ScriptingObjectPtr, Object*) when exiting a project
- WASM Heap size greatly increases when UI elements are present in a WebGL build
- Crash on mdb_node_add when opening a specific project with a corrupted Library
Resolution Note:
Fixed in 2020.2.0a12