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
- Texture2D hash changes inside of an AssetBundle when rebuilding a SpriteAtlas bundle with an empty AssetPostprocessor Script enabled
- Aniso Level still applies when Generate MipMap is disabled in Texture Import Settings
- Mipmap Limit Groups long names are not truncated when creating a new Mipmap Limit Group with a long name
- “ArgumentException: Invalid double parameter.” error is thrown when Infinity is typed into the Fixed Timestep field
- GameObject becomes gray when using HDRP and STP together on macOS
Resolution Note (2022.1.X):
Postponed