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

Asset - Database

-

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

  1. Resolution Note:

    Fixed in 2020.2.0a12

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.