Search Issue Tracker
Postponed means that the issue was either a feature request or something that requires major refactoring on our side. Since that makes the issue not actionable in the close future we choose to close it as Postponed and add it on our internal roadmaps and technical debt pages instead.
Postponed
Votes
0
Found in
2020.3
2021.1
2021.2
2022.1
2022.1.0a9
Issue ID
1366036
Regression
No
Errors and warnings logged in the Console when calling AssetDatabase methods during OnValidate that reimports Assets
How to reproduce:
1. Open the attached project "CheckConsistencyLoadAssets"
2. In the Project window, select the asset "SelectMe" (Assets/SelectMe.asset)
3. In the Inspector, right-click the header and select "Display the Error!"
4. Inspect the Console window (Window > General > Console)
Expected result: No warnings or errors are displayed in the Console
Actual result: Several warnings and errors are displayed in the Console
Reproducible with: 2020.3.19f1, 2021.1.22f1, 2021.2.0b13, 2022.1.0a9
Could not test with: 2019.4.30f1 (‘AssetDatabase’ does not contain a definition for ‘RegisterCustomDependency’)
Note: in versions starting from 2022.1.0a8, a message is displayed in the Console window alongside the warnings and errors
Errors:
Destroying GameObjects immediately is not permitted during physics trigger/contact, animation event callbacks, rendering callbacks or OnValidate. You must use Destroy instead.
UnityEditor.AssetDatabase:Refresh ()
Warnings:
SendMessage cannot be called during Awake, CheckConsistency, or OnValidate
UnityEngine.GameObject:.ctor (string,System.Type[])
SendMessage cannot be called during Awake, CheckConsistency, or OnValidate
UnityEditor.AssetDatabase:Refresh ()
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
- Articulation Body with 'Revolute' Joint Type has erratic behavior when Upper Limit is set to above 360
- WebGL Player fails to render Scene when Terrain with Detail Mesh is added and WebGPU Graphics API is used
- Inconsistent errors are logged when different types are passed into the Query "Q<>" method in UIToolkit and the ancestor VisualElement is null
- Crash on GetMaterialPropertyByIndex when opening a specific Scene
- Discrepancies in the styling are present when using a TSS file instead of a USS file in custom EditorWindow
Resolution Note (2022.1.X):
Postponed