Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update modified variable names on the Event Sheet #5571

Open
LuniMoon opened this issue Aug 16, 2023 · 2 comments
Open

Update modified variable names on the Event Sheet #5571

LuniMoon opened this issue Aug 16, 2023 · 2 comments
Assignees
Labels
✨ enhancement 😤Non optimal UI A bug/issue where the UI is usable but not optimal

Comments

@LuniMoon
Copy link
Collaborator

Issue based on this forum's topic request:

Need feature to automatically update variable names in event/action sheets across game based on the changes done in Game Settings> Global variables or in the instance through Properties, or in the object through Object >Variables.
For example,

If the instance variable InstVar for an object has been renamed to InstaVarNew through Properties, any events/actions where InstVar is used should be automatically replaced by InstaVarNew.
If the GlobalVariable (LevelVar) is restructured as GlobalVariable(PlayerStats.Levelvar), then events/actions where LevelVar is used should be automatically replaced by PlayerStats.Levelvar.
This feature will help developer quickly implement the changes to the structure/variables and evolve variables model as appropriate. Currently, after making the changes in Instance/ObjectVariables/Game Settings> Global variables, developers have to update the variable name/structure manually in the event sheet.

Please note that this change is only request for any structural/name changes to the variables and not their type (changed from Boolean>Num, etc.). In case of such changes, the corresponding events where these variables are being used must be highlighted for developers to review.

Today variable names have to be updated by hand if their name has been changed via properties.
In order to be more efficient and reduce small repetitive actions, GDevelop's system is required to update the names of said modified elements.

Input from engineering: some exploration is needed since a scanning of the event sheet would be required in order to update the changed names.

@LuniMoon LuniMoon added ✨ enhancement 😤Non optimal UI A bug/issue where the UI is usable but not optimal labels Aug 16, 2023
@kons-dev
Copy link

For the time being, could this be done by search and replace in the json file?

@4ian
Copy link
Owner

4ian commented Aug 18, 2023

You can do it on your own like this - but be sure to make a backup of your json file before because there is a risk of corrupting it or replacing things that are not your variable if the name is too generic/too short.

That's why it needs to be done by GDevelop to be 100% safe :)

@4ian 4ian self-assigned this Aug 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ enhancement 😤Non optimal UI A bug/issue where the UI is usable but not optimal
Projects
None yet
Development

No branches or pull requests

3 participants