Search Issue Tracker
Won't Fix
Votes
0
Found in
2023.2.0a18
Issue ID
UUM-39900
Regression
Yes
"Destroying object multiple times. Don't use DestroyImmediate on the same object in OnDisable or OnDestroy" Error is thrown when trying to replace a GameObject/Prefab with a different Prefab from the Context Menu's "Replace..." option
Reproduction steps:
1. Open the attached “Repro.zip” project
2. Open the “Assets/Scenes/SampleScene.unity” Scene
3. Right-click on the “GameObject1” GameObject in the Hierarchy window
4. Select “Prefab” and then “Replace…” in the Context menu
5. Observe
Expected result: Another window pops up, which lets you to select a prefab, which is going to replace the selected GameObject
Actual result: “Destroying object multiple times. Don't use DestroyImmediate on the same object in OnDisable or OnDestroy” Error gets thrown in the Console window
Reproducible with: 2023.2.0a15, 2023.2.0a18
Not reproducible with: 2022.3.1f1, 2023.1.0b21, 2023.2.0a14
Couldn’t test with: 2020.3.48f1, 2021.3.
Reproducible on: Windows 10 Pro (22H2)
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
- Camera Preview shows view from last selected Base Camera for Overlay Cameras
- Incorrect GUID is present when replacing a different asset with an asset that has the same name
- [Linux] "Shutdown worker was forced killed because it kept running. Worker 2" error is thrown after creating a project on
- [Ubuntu] Can't type the letter f
- Shader warning in 'HDRP/Lit': 'PUNCTUAL_SHADOW_LOW' is thrown after building High Definition 3D template
Resolution Note:
The issue is already fixed as from 2023.2.0a20.