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

Icons of custom nodes written in C# are not properly scaled #53492

Closed
derkork opened this issue Oct 6, 2021 · 2 comments
Closed

Icons of custom nodes written in C# are not properly scaled #53492

derkork opened this issue Oct 6, 2021 · 2 comments

Comments

@derkork
Copy link

derkork commented Oct 6, 2021

Godot version

v3.3.3.stable.mono.official [b973f99]

System information

Windows 10

Issue description

I have created a custom node both in GDScript and C#. The C# node is registered using an editor plugin. Both nodes refer to the same icon to be used as node icon. The icon is 512x512 pixels.

In the editor the icon of the custom GD-Script node is properly scaled to the icon size that all nodes have, but the icon of the custom C# node is not scaled at all:

image

image

Steps to reproduce

Using the attached project:

  • In the project settings enable the custom nodes plugin. This should load the custom node.
  • Open narf.tscn to see the oversized icons in node tree and scene tab.
  • Add a new node using the + button, to see the difference between C# custom node and GDScript custom node, both using the very same icon file.

Minimal reproduction project

IconIssue.zip

@kleonc
Copy link
Member

kleonc commented Oct 6, 2021

I have created a custom node both in GDScript and C#. The C# node is registered using an editor plugin. Both nodes refer to the same icon to be used as node icon. The icon is 512x512 pixels.

In the editor the icon of the custom GD-Script node is properly scaled to the icon size that all nodes have, but the icon of the custom C# node is not scaled at all:

Note that behavior is the same in GDScript for the types added with the EditorPlugin's add_custom_type() method (contrary to those added with class_name). So that's not C# specific issue, textures seem to be not scaled for any type added using add_custom_type() (or its equivalent in C# etc.).

@Calinou
Copy link
Member

Calinou commented Oct 6, 2021

Duplicate of #20197.

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

4 participants