GDevelop
GDevelop copied to clipboard
Nested/Child Instance Variables are not editable
Describe the bug
I know this was a bug before, so I am not sure if it has snuck back in. As of beta 110 you can not edit instance variables if they're a child / is nested. I have attempted to covert them to a string/number but no change.
If the variable does not have an child / is nested, it works fine.
Please double check that the bug is not already reported in the issues list.
To Reproduce
Steps to reproduce the behavior:
- Create an Object with a Child / Nest Variable.
- Place it on the Scene.
- Unable to Edit.
Other details
- Windows 10
- Beta 110
In instances list there are icons for add, and another for change types of variables, i can't see the icons, are you really on beta 110?
Anyway, can you send a project file for reproducing the issue?
In instances list there are icons for add, and another for change types of variables, i can't see the icons, are you really on beta 110?
Anyway, can you send a project file for reproducing the issue?
In that image you're not using a child/nested variable.
If the variable does not have an child / is nested, it works fine.
110% sure I am in beta 110
Here is an example project: InstanceVars.zip
Hi @AtomicCrocStudios,
Here is what's happening (and that is maybe not clear with the UI):
-
In the example you sent, your object has 2 (object) variables:
-
When you change
youCanEditMe
to 5 for instance, the IDE creates an instance variable with the same nameyouCanEditMe
with value 5, that overrides the object variable: -
And if you click the Reset button on the newly created instance variable in the Properties panel, it removes it so that the object variable is now the truth value:
Changing the children of an object Structure
variable at the instance level is a bit trickier, it would need to first copy the whole object variable in the instance, and then change the value of one of its children.
You can do it by:
-
Open Instance variables dialog:
-
Click
Edit object variables
-
Select
YouCantEdit
-
Copy it
-
Come back to instance variables dialog
-
Paste it
-
Modify the child value
And if you close the dialog, you can see that the instance variable in the Properties panel now appears as an overwritten object variable and you can edit its child:

We should maybe add a button for Structure
object variable to give the possibility to directly copy-paste them at the instance level from the Properties panel instead of having to follow the above path to do it.
But it could bring confusion because if one does it, and then changes the object variable (adding a child for instance) expecting that every overwritten instance variable to have the same change, one would be disappointed.
But it could be a whole feature to develop.
I just saw the same issue referenced in https://github.com/4ian/GDevelop/discussions/2351
I close this issue. The problem doesn't occur since changes in the app.