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

Can't tell expected node type without looking into the script #62483

Closed
KoBeWi opened this issue Jun 28, 2022 · 3 comments · Fixed by #79593
Closed

Can't tell expected node type without looking into the script #62483

KoBeWi opened this issue Jun 28, 2022 · 3 comments · Fixed by #79593

Comments

@KoBeWi
Copy link
Member

KoBeWi commented Jun 28, 2022

Godot version

5ab59ee

System information

Windows 10 x64

Issue description

When you export Node (after #62470), you can't tell what type it expects from looking at the inspector:
image
Moreover, when you click Assign, you see list of nodes and the wrong types are disabled. But if there is no expected type in the list, you don't know what type it wants. You need to look into the script.

In the inspector, we could have an icon of the expected node type.
In the scene picker dialog, the type could be in the title.

Steps to reproduce

  1. Export some Node type variable
  2. Forget the type
  3. Try to assign it

Minimal reproduction project

No response

@vnen
Copy link
Member

vnen commented Jun 28, 2022

I believe this was already an issue with exported NodePaths (which can also be typed). Since it's all the same code then fixing one will fix both.

@Nolkaloid
Copy link
Contributor

I think that adding the icon next to the slot would be a good idea, but it could be confusing when typing with an abstract class such as PhysicsBody3D as those dont have specific icons.

@Mickeon
Copy link
Contributor

Mickeon commented Sep 5, 2022

I think that adding the icon next to the slot would be a good idea, but it could be confusing when typing with an abstract class such as PhysicsBody3D as those dont have specific icons.

Problem is multiple Node types can be exported at the same time, and they don't even have to be related (something along the lines of @export_node_path(Node2D, Node3D) is completely valid and filters accordingly). I believe an icon would also be mostly intrusive to the name of the actual Node, which is probably more important. Selected Node's type can be inferred by context.

I'm currently thinking of displaying it in the selection window, in a nicer way than the title which, I tested, would not fit. It's easily possible to see what Node types are being filtered. The problem is figuring out something that looks good.

@YuriSizov YuriSizov modified the milestones: 4.0, 4.x Jan 12, 2023
@akien-mga akien-mga modified the milestones: 4.x, 4.2 Aug 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants