-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
C# export typed enum's are corrupted when in a collection or array form. #42926
Comments
I was able to do a bit more diagnostics on this, and I have a workaround and a hint as to whats happening. If you export an array, the node inspector will represent it as an intpool. A workaround for this is to only use the Godot.Collections.Array type for the lists being exported, at least so far as enumerations are concerned. |
@rpcesar is there a workaround for GDScript as well? |
I am not aware that this problem applies to GDScript, if it does I have not tested with or for it. |
Yeah. Enums seem to be pretty buggy in the inspector for C# and GDScript |
This issue will only be fixed in 3.5 as #53942 was merged too late for 3.4 (it was in feature freeze). If you want to make sure of this, try building a Mono-enabled editor from source using the |
Version:
v3.2.3.stable.mono.official
OS/Device
Windows 10 PC. High end.
Issue Description:
When exporting a collection of enumerators as a List or Array ([]), the properties inspector gives the ability to add and populate a list of of said enumeration. You can save and load the class, and the properties remain in tact. However if you attempt to access said variable at any point (even in its original property setter) , the results (value) are corrupted. The LENGTH of the collection or array is correct, but the data is not correct. I am seeing this issue with ANY exported collection of enumerations right now. Note that AFAIK enumerations work, in general. Collections work, in general. But collections and enumerations, together, bring back faulty data.
Steps to reproduce:
Create a script that subclasses Node. Create an enum type. Create a property or public exported variable of a collection type or array type on that node. Drag the node into the project. Set up a list of the enumerations. Save it. Write any code at any location that accesses said variable. Observe said variables contents. (or just see image)
Note the image above image is from a right as soon as the remote debugger attached and it was setting the value from the serialized scene.
The text was updated successfully, but these errors were encountered: