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)

  1. Resolution Note:

    The issue is already fixed as from 2023.2.0a20.

Add comment

Log in to post comment