YoYoGames / GameMaker-Bugs

Public tracking for GameMaker bugs
24 stars 8 forks source link

Asset Browser: Renaming an asset does not update any Object "Variable Definitions" items that refer to the old name #6159

Open gm-bug-reporter[bot] opened 4 months ago

gm-bug-reporter[bot] commented 4 months ago

Description

When you rename a room in the Asset Browser and then load that room through a variable definition, the game will crash. It appears the IDE is showing the correctly assigned room name but the game will crash because the ACTUAL room name in the variable has become invalid. If you rename the room, then go to the room instances with that variable definition and force them to (redundantly) point to the correct room, the problem goes away.

Steps To Reproduce

  1. Rename roomGame_3_0 to anything else.
  2. Run the game and press the Z key on the bootup screen. This will try to load roomGame_3_1.
  3. This room contains a door object with a variable definition "roomExitTargetRoom" that is set to load roomGame_3_0. The instance will show the correct room name set to that variable. But the game will crash.
  4. Change the roomExitTargetRoom variable in the instance to point to roomGame_3_0 (whatever you renamed it to).
  5. Rerun the game and the bug will be fixed.

Which version of GameMaker are you reporting this issue for?

IDE v2024.4.1.152 Runtime v2024.4.1.202

Which operating system(s) are you seeing the problem on?

Windows 10.0.19045.0

7b1662db-0066-4fa3-9944-0349a201d358

YYDan commented 4 months ago

Would be worth reviewing if we fix https://github.com/YoYoGames/GameMaker-Bugs/issues/1287 at the same time, as presumably supporting this requires much of that one to be done first.