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
- Importing a theme through the Inspector allows importing the same theme multiple times
- Editor window disappears when repositioned in a specific way in Editor
- Importing a theme through the Inspector allows circular import
- FocusNextInDirection not focusing when used on multiline TextFields
- Single click calls UI Element renaming with a delay when clicked on the UI Element name
Resolution Note:
Fixed in 2020.2.0a12