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
- Sprite shadows are not rendered when the light source is placed near the sprite
- Multiple Video Players are not playing simultaneously when played in WebGL
- "Rename Prefab File?" window does not pop up when renaming Prefab in the Project window
- [Linux] Crash on MenuController::ExecuteMenuItem when selecting recent scene
- Warnings appearing in the Console window when creating a new URP 3D Sample project
Resolution Note:
Fixed in 2020.2.0a12