EiTaNBaRiBoA / JsonClassConverter

Simplify your JSON and class interactions! jsonClassConverter effortlessly stores JSON data, converts between JSON and class objects, and instantly loads JSON into usable classes. Streamline your development and data handling with this essential tool.
MIT License
42 stars 2 forks source link

Texture2D #3

Closed herve-ch closed 1 week ago

herve-ch commented 2 weeks ago

Hello I try to serialize a resource with a Texture2D but it doesn't work, we can't use Texture2D?

EiTaNBaRiBoA commented 1 week ago

Hello I try to serialize a resource with a Texture2D but it doesn't work, we can't use Texture2D?

Hey there! Thanks for the report and testing help. it looks like the problem is related to how the plugin handles resources. To get this solved, I need to know a bit more about how you'd like the resource to be loaded. Can you tell me:

herve-ch commented 1 week ago

Hello there! in my case I was trying to store a player inventory, each slot has an item with a texture2D resource so I expect to get my textures back when getting my class from my stored ison file.

Can I ask another question? I tried to serialize deserialize a Godot dictionary with custom classes but when I get my class back, I got a dictionary of dictionary. Are dictionaries supported ? Thanks for your work

EiTaNBaRiBoA commented 1 week ago

Hello there! in my case I was trying to store a player inventory, each slot has an item with a texture2D resource so I expect to get my textures back when getting my class from my stored ison file.

Can I ask another question? I tried to serialize deserialize a Godot dictionary with custom classes but when I get my class back, I got a dictionary of dictionary. Are dictionaries supported ? Thanks for your work

Yes, dictionaries are supported, although currently without typed or referenced values. I'm looking forward to Godot 4.4, which will introduce typed dictionaries. Once that's released, I'll add compatibility to ensure the plugin works smoothly with the new features. For the time being, only basic dictionaries are supported, but rest assured that support for reference types and objects is on the roadmap and will be included in a future update.

For now I will start working on texture2d and other resource types

herve-ch commented 1 week ago

ok thanks, for now I'll just use Arrays of Class instead of dictionaries and String path instead of Texture2D, then get the texture2D back from the String

EiTaNBaRiBoA commented 1 week ago

ok thanks, for now I'll just use Arrays of Class instead of dictionaries and String path instead of Texture2D, then get the texture2D back from the String

The Texture2D issue is fixed. Please let me know when Godot 4.4 is released so i can update the typed dictionaries.

herve-ch commented 1 week ago

Godot 4.4 dev 2 is released and support typed dictionaries

EiTaNBaRiBoA commented 1 week ago

Godot 4.4 dev 2 is released and support typed dictionaries

I'm hesitant to make changes until Godot 4.4 reaches at least beta stage, as I'd like to avoid breaking compatibility with Godot 4.3 as this plugin was released specifically to godot 4.3. Once the beta is released, it signals that the full release is close, and transitioning users to 4.4 will be smoother, and i will release the plugin for godot 4.4

herve-ch commented 1 week ago

yes no worries we can wait for final release no rush

Thanks