(De)serialization in Godot #10643
MathiasBaumgartinger
started this conversation in
Scripting
Replies: 1 comment 1 reply
-
Have you tried Object.get_script().get_script_property_list()? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am working on a project, where certain layers can be configured/stored in a json file. Serialization is somewhat straight forward. To deserialize those objects, I want to use
Object.get_property_list()
to get all members of the corresponding class. The initial idea was to handle the deserialization (i.e. aResource
is stored as path to the resource) via the class_name of the object.I have a few custom classes which would require more sophisticated (de)serialization. For instance a dictionary of
String
to a customResource
. I would need the name of the custom class to handle this specific case. Sadly,Object.get_property_list()
only returns the native base class.For example:
would show "RefCounted" in the property list. In some forum post I read that this was intended behaviour. However, personally I feel this is somewhat of a limitation.
Does anyone have an idea on how I might handle this differently?
Beta Was this translation helpful? Give feedback.
All reactions