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

GDExtension icons are big in 'Remote' scene tree #92309

Closed
VojtaStruhar opened this issue May 24, 2024 · 0 comments · Fixed by #91622
Closed

GDExtension icons are big in 'Remote' scene tree #92309

VojtaStruhar opened this issue May 24, 2024 · 0 comments · Fixed by #91622

Comments

@VojtaStruhar
Copy link
Contributor

Tested versions

v4.2.stable.official [46dc277]

System information

Godot v4.2.stable - macOS 14.5.0 - Vulkan (Forward+) - integrated Apple M2 - Apple M2 (8 Threads)

Issue description

I added icons to GDExtension nodes. Although the documentation clearly says to use 16x16 icons, I disobeyed and just downloaded a random Swift logo image from the internet. It is 92x92 pixels, but displayed in the editor just fine! It only displays as too big in the Remote scene tree view. See sceenshots.

Editor scene tree Local scene tree Remote scene tree
scene-tree local-scene-tree remote-scene-tree

I wouldn't be surprised if the icon was too big everywhere. Docs make it clear that it should be 16x16. But like this 2 of the 3 scene tree views work fine and one looks broken. I think the image should be scaled down everywhere.

I'm confident that this isn't a Swift or MacOS issue, but this is how I encountered the bug.

Steps to reproduce

  • I cloned the Swift port of Kenney's Godot platformer starter kit, built it and added the dynamic libraries into the bin folder. I'm guessing you could do any GDExtension project, but this is the one I used.
  • Downloaded icon of Swift from the internet (92x92 pixels!)
  • There is already a Platformer3D.gdextension in the bin folder
  • Added the gdextension icons to all the nodes (docs) with this code:
[icons]
Player = "res://swift-logo.png"
AudioPlayer = "res://swift-logo.png"
Player = "res://swift-logo.png" 
Coin = "res://swift-logo.png"
Cloud = "res://swift-logo.png"
FallingPlatform = "res://swift-logo.png"
GameUI = "res://swift-logo.png"
CameraView = "res://swift-logo.png"
  • Run the project, switch to Remote scene tree view

Minimal reproduction project (MRP)

I stripped down the Kenney project port from everything that isn't needed. This zip contains just a single Swift node and a simple Godot scene that contains that node.

mrp-gdext-icons.zip

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.

2 participants