-
-
Notifications
You must be signed in to change notification settings - Fork 23.1k
Description
Tested versions
v4.4.1.stable.official [49a5bc7]
System information
Godot v4.4.1.stable - Windows 11 (build 26100) - Multi-window, 1 monitor - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 4060 Laptop GPU (NVIDIA; 32.0.15.6607) - AMD Ryzen AI 9 HX 370 w/ Radeon 890M (24 threads)
Issue description
When right-clicking a Resource
's property that has @export
, if that property is set to a Script
, the inspector does not show the Clear
button to set the property to null
.
This is what I would expect to see:
But when the property is set to a Script
:
As you can see, the Clear
button is not shown on the Script
.
This happens regardless of the type of the property. Even when the property is typed to Resource
, when setting it to a Script
it still doesn't show Clear
. Also, for some reason this issue does not apply when the property is exported from a Node
.
I'm guessing this is done to prevent people from clearing an object's script by clearing its script
property, but this shouldn't apply to other properties.
This issue is preventing me from adding a custom revert value for Script
properties, since they cannot (easily) be set to null
again afterwards.
Steps to reproduce
- Create a custom
Resource
script. - Add an
@export
-ed property of typeScript
(or an ancestor class). - Create an instance of the custom
Resource
. - Set the property to a
Script
. - Right-click the property, and observe that the
Clear
button is missing.
Minimal reproduction project (MRP)
Metadata
Metadata
Assignees
Labels
Type
Projects
Status