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
When a custom Resource contains an exported GDScript, many of the ordinary methods for saving edits to that script file stop working.
WHAT DOES NOT WORK:
Ctrl + S
Ctrl + Alt + S (save script)
Shift + Alt + S (save all)
right-clicking on the script in the Scripts Panel and clicking "Save"
clicking "Save" on the dropdown for the exported GDScript, in the parent resource's Inspector window.
Running the project
Quitting the project - this results in a "Save changes before quitting?" dialogue that reappears every time you press "Save & Quit"
WHAT DOES WORK:
Closing the script from the Scripts Panel (prompts a "Close and save changes?" dialogue). Works ONCE and will not save further edits.
Clicking "Save" on the parent resource in the Inspector.
Steps to reproduce
Create a new GDScript file, resource_class.gd.
extends Resource class_name CustomResource @export var custom_script: GDScript
Create a new instance of this resource, resource_instance.tres.
Navigate to resource_instance.tres's Inspector tab, click on Custom Script and click New GDScript.
Type "Hello World" in the new Custom Script. Press Ctrl+S to save.
Observe that the exported script's name in the Scripts Panel changes from [unsaved](*) to new_resource.tres::GDScript_xxxxx(*).
Observe that pressing Ctrl+S does not save any changes to the Custom Script. Opening resource_instance.tres in a text editor will confirm that no changes are being saved.
Tested versions
System information
Godot v4.2.1.stable - Windows 10.0.19045 - Vulkan (Forward+) - dedicated AMD Radeon RX 5700 (Advanced Micro Devices, Inc.; 31.0.24002.92) - AMD Ryzen 5 3600 6-Core Processor (12 Threads)
Issue description
When a custom Resource contains an exported GDScript, many of the ordinary methods for saving edits to that script file stop working.
WHAT DOES NOT WORK:
WHAT DOES WORK:
Steps to reproduce
resource_class.gd
.extends Resource
class_name CustomResource
@export var custom_script: GDScript
resource_instance.tres
.resource_instance.tres
's Inspector tab, click on Custom Script and click New GDScript.[unsaved](*)
tonew_resource.tres::GDScript_xxxxx(*)
.resource_instance.tres
in a text editor will confirm that no changes are being saved.Minimal reproduction project (MRP)
Export Script Saving MRP.zip
The text was updated successfully, but these errors were encountered: