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
- "One or more data file missing for baking set NewScene Baking Set. Cannot load shared data." error in Player when a specific project is built
- Choosing new HDR Colour using RGB values breaks colour on Intensity Selectors
- Rendering/Decal Layer Mask options are different inside Prefab Mode and outside Prefab Mode when the project is upgraded to Unity 6
- Incorrect Realtime GI Light Probes baking when more than one Light Probe Group is used and "Baked Global Illumination" is enabled
- Hovering on the three-dot menu also highlights the tab header near it when not all tabs fit the bar
Resolution Note:
Fixed in 2020.2.0a12