Error message:
[Worker0] Destroying GameObjects immediately is not permitted during physics trigger/contact, animation event callbacks, rendering callbacks or OnValidate. You must use Destroy instead.
Repro steps:
- create a new project in HDRP template
- create a new material
- try to rename the material
Reproducible with 2023.1.0a2 or newer
Cannot repro in 2022.2, or in 2023.1.0a1
Note: the issue is only reproducible the first time you create the project. If you open an existing project, the error doesn't appear anymore