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
Deep copying a custom resource ( cust_resource.duplicate(true) ) created in 4.4dev4 or newer results in Parser Error: Class "CustomResource" hides a global script class.
The same project and custom resource instance created in 4.4dev3 or older does not result in the error. Seems to be a regression related to #72119 fixed in #71142
Steps to reproduce
As in MRP:
Create new custom resource with class_name (completely empty class is fine)
Perform a .duplicate(true) on custom resource
For some reason some editor only metadata gets serialized to the file: metadata/_custom_type_script, this contains the same script as the script property. This metadata is not marked as never duplicate so it will result in the attempt to duplicate the script.
You can manually edit the resource file using a text editor. Remove the metadata/_custom_type_script property, as long as you don't re-save the scene it should keep working.
Tested versions
System information
Godot v4.4.dev6 - Windows 10.0.22631 - Multi-window, 1 monitor - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 4070 Laptop GPU (NVIDIA; 32.0.15.6636) - 13th Gen Intel(R) Core(TM) i9-13900H (20 threads)
Issue description
Deep copying a custom resource ( cust_resource.duplicate(true) ) created in 4.4dev4 or newer results in Parser Error: Class "CustomResource" hides a global script class.
The same project and custom resource instance created in 4.4dev3 or older does not result in the error. Seems to be a regression related to #72119 fixed in #71142
Steps to reproduce
As in MRP:
Create new custom resource with class_name (completely empty class is fine)
Perform a .duplicate(true) on custom resource
Minimal reproduction project (MRP)
mrp_resource_duplicate.zip
The text was updated successfully, but these errors were encountered: