【1.2.0 BUG】Crash bug when closing menu after spawning object via ObjectMountTarget node

Reproduction Steps:

  1. Launch the test scene.

  2. Press the Z key.

  3. After the menu appears, it will spawn an object. Press Z again to close the menu; pressing Z once more to reopen the menu will cause a crash.

Issue Description:

When the menu contains an object, opening and closing normally works fine.

However, when using the ObjectMountTarget node to spawn an object, closing the menu afterward will output an error in the console.

Reopening the menu will result in an immediate crash.

:warning: Warning:

As before, if you despawn the object created by the ObjectMountTarget node before closing the menu, the crash does not occur.

But if the menu still has an attached object when closed, console errors will still appear.


1770644572250

Error Message

The crash can be reproduced in version 1.2.0 based on the experiment.