ゲームの再読み込みやセーブ/ロードをしてもシーンが変更されない問題について

I encountered an issue where I used three scenes for my game: Start Game → In-Game → End Game. However, when I fail the game and try to restart, whether by saving/loading a game save or using the game reload function, I notice that objects from the previous scene aren’t cleared, causing lag. Although global variables in the project have been reset, the scene objects were generated using object spawning functions and bullet firing functions. I’m not sure if this is the reason they can’t be cleaned up, and scene transitions also seem problematic.

I’ve set all scene transition conditions to end the previous scene, controlled by other objects, but sometimes I encounter display bugs causing scene confusion—for example, after game over, it goes to the start interface, then game over again, then the in-game scene, leading to a lagging state. After a few seconds, the current scene objects are cleared, and the game restarts. This is very confusing.

I’m currently participating in a gamejam using AGM,Thank you very much for any help you can provide.

生成されたオブジェクトのBaseSettingsノードには、復元条件があるかどうかを指定するオプションがあります。デフォルトでは「シーン変更」ですが、「None」に変更すると、ゲームデータが読み込まれた際に生成されたオブジェクトは再度生成されなくなります。

「いいね!」 1

どうもありがとうございます。あなたの方法を使用して問題が解決しました。

「いいね!」 1