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

Exported typed array with setter not saved in tool mode #71607

Closed
Badaxis opened this issue Jan 18, 2023 · 0 comments · Fixed by #69248
Closed

Exported typed array with setter not saved in tool mode #71607

Badaxis opened this issue Jan 18, 2023 · 0 comments · Fixed by #69248

Comments

@Badaxis
Copy link

Badaxis commented Jan 18, 2023

Godot version

v4.0.beta12.official [3c9bf4b], v4.0.beta13.official [caacade]

System information

Windows 10

Issue description

There seems to be an issue when using export typed arrays with setter in tool mode. Depending on the syntax used, the content of the array set in the inspector may not be saved and the array would be empty when the project is reloaded.
The data is saved properly in the tscn file but it is erased after I reload the project and then save.
Even when the data is on the tscn file, it's not taken into account if I try to access it in code.
It doesn't matter what is the type of the array, in the linked project I used Array[float] but it's the same issue with array of resources; for array of nodes I opened a different topic: #71603
I will add that there is no issue when not in tool mode.

Steps to reproduce

It is a bit tedious to explain clearly the test setup so I highly suggest to open the Minimal reproduction project linked below.
After loading the project, assign a value in the arrays.
Run the scene to get the prints in the output. (If you skip this part it the same result)
Reload the project, the problematic arrays should be empty.
Save.

Also check the tscn file in a text editor during the process.

Minimal reproduction project

typed_array_set_tool.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants