Skip to content

Possible to copy-paste a Resource into an exported property field of different Resource type #112347

@MajorMcDoom

Description

@MajorMcDoom

Tested versions

Reproducible in: 4.5.1.stable, 4.4.1.stable
Not reproducible in: 4.3.stable

System information

Godot v4.5.1.stable - Windows 11 (build 26100) - Multi-window, 1 monitor - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1660 SUPER (NVIDIA; 32.0.15.7652) - Intel(R) Core(TM) i7-10700F CPU @ 2.90GHz (16 threads) - 15.92 GiB memory

Issue description

It is possible to copy-paste a Resource into an exported property field of a different Resource type. For example, you can copy-paste a Material into a Mesh field, or a GDScript into a Texture field, etc.

Details:

  • The issue seems to only occur on exported properties of scripts, not on properties of built-in nodes.
  • The issue persists across scene and project reloads.
  • The issue does not persist into runtime (the pasted values become null).
  • The issue does not occur if the exported property is defined in a tool script (likely due to it running the same validation as runtime).

Steps to reproduce

  • Open test.tscn in the attached project
  • On the root node, copy/paste any of the properties into any of the other properties

Image

Minimal reproduction project (MRP)

bug-report-2.zip

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    For team assessment

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions