4ian / GDevelop

🎮 Open-source, cross-platform 2D/3D/multiplayer game engine designed for everyone.
https://gdevelop.io
Other
10.81k stars 848 forks source link

Renaming an extension can break an action inside its events #5563

Open 4ian opened 1 year ago

4ian commented 1 year ago

Is there an existing issue for this?

Describe the bug

Seems like a "refactoring" is not done properly when we rename an extension.

Steps to reproduce

  1. Open Tappy Plane example.
  2. Rename the extension "PanelSpriteButton" to something else: image
  3. In the object of the extension, in the doStepPostEvents, observe how an action is now not found anymore: image

GDevelop platform

Desktop, Web

GDevelop version

5.2.169

Platform info

No response

Additional context

cc @D8H

D8H commented 1 year ago

Thus, instructions that are automatically declared on event-based object are not refactored. I think that doing the refactor for each of these instructions specifically would be a bit weak because it would break each time the declaration is changed.

Do you think we should rather apply a global rename refactor that replaces any MyExtension:: prefix in instruction types?

Note that capabilities will solve the issue for most of these instructions, but maybe not all of them (nor the ones that may be added in the future)