Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exported unnamed Node subclasses don't match anything in the node selector #86636

Closed
vmedea opened this issue Dec 30, 2023 · 2 comments
Closed

Comments

@vmedea
Copy link
Contributor

vmedea commented Dec 30, 2023

Tested versions

4.2-stable

System information

N/A

Issue description

With the following GDscript:

extends <SomeNode2D>

const GrowingRect = preload("growing_rect.gd")

@export var growing_rect: GrowingRect

where growing_rect.gd contains a class extending Node:

extends Node2D
...

The variable slot is successfully exported, however, it's not possible to select a node of this type in the editor inspector. The "Select a node" list remains empty, or when "Show All" is on, it's greyed out:
image

This is inconvenient because it forces the use of global class_name for everything that's exported, cluttering the global namespace, instead of a scene being local and self-contained.

See also #77322, however, in contrast to that more general issue, the export works fine (by manually editing the scene file), it's just the editor that doesn't show matches.

Steps to reproduce

  • Open the attached minimal reproduction project
  • Open "root.tscn" scene
  • Select "PlayerController"
  • In the inspector, remove the selected node for "GrowingRect" then go to the chooser and try to select the node again

Minimal reproduction project (MRP)

repro-anonnode.tar.gz

@kleonc
Copy link
Member

kleonc commented Dec 30, 2023

Already fixed by #82528 (included in v4.3.dev1.official [9d1cbab] and marked for cherry-picking into future 4.2.x).

@vmedea
Copy link
Contributor Author

vmedea commented Dec 30, 2023

Thank you, that's great news!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants