You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a resource that has export variables with custom class types those properties are not loaded properly with load() (Previously saved with ResourceSaver). Seems to be related to godotengine/godot#32856
Steps to reproduce
Make 2 custom resources
Have one of them have a variable with the other one as its type
Save the first resource
Load it back
See that the custom class property didn't load correctly
The issue seems to be that when a class is declared with class_name, saving it also saves an external resource containing the script path
example: [ext_resource type="Script" path="res://TestType.gd" id="1_ryveg"]
But when its declared with class a sub resource is created containing no additional info (like the source code)
example: [sub_resource type="GDScript" id="GDScript_qs7av"]
So the solution to this issue would be to include more data in the GDScript sub resource I think.
paczek654321
changed the title
ResourceSaver.load() not working when the resource has custom class properties
Script/path is not saved when saving a GDScript object as a sub resource with ResourceSaver
Feb 2, 2025
Tested versions
v4.3.stable.official [a06b0a0]
System information
Redot v4.3.stable - Arch Linux #1 ZEN SMP PREEMPT_DYNAMIC Sat, 18 Jan 2025 02:26:52 +0000 - X11 - Vulkan (Forward+) - dedicated AMD Radeon RX 7700 XT (RADV NAVI32) - AMD Ryzen 7 5700X 8-Core Processor (16 Threads)
Issue description
If a resource that has export variables with custom class types those properties are not loaded properly with load() (Previously saved with ResourceSaver). Seems to be related to godotengine/godot#32856
Steps to reproduce
Minimal reproduction project (MRP)
resourcesaverbugreproduction.zip
The text was updated successfully, but these errors were encountered: