godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
88.94k stars 20.17k forks source link

Remote Scene doesn't use C# IconAttribute for node instanciated, but Inspector is able to use it? #95209

Open maxime4000 opened 1 month ago

maxime4000 commented 1 month ago

Tested versions

Probably reproductible on all version.

System information

Window 10 - 4.3-RC2

Issue description

I'm working with Godot C# and I use IconAttribute to have custom icon in the editor. [GlobalClass, Icon("res://assets/textures/icons/tbd-icon.svg")] Mostly everywhere you will be able to see the icon, but in the "Remote Scene" the tree view won't show any custom icon for instanciated node. You click on the node which update the Inspector view and you will see the EditorDebuggerRemoteObject do include the CustomIcon but not the Remote Scene

image

Steps to reproduce

  1. This
    
    using System;
    using Godot;

[GlobalClass, Icon("res://path/to/icon/some-icon.svg")] public partial class GlobalManager : Node3D, IGlobalManager { public static GlobalManager Instance { get; private set; } }


2. Make it Autoload or just instanciate in a working scene. 
3. Run the scene in the debugger and pause (or not!) and look at the Remote Scene tree where custom icon won't be use. 
4. For reference, I use this site (https://uxwing.com/) for icons, and edit the SVG for better representation of the icon. 

### Minimal reproduction project (MRP)

[mrp-custom-icon.zip](https://github.com/user-attachments/files/16514272/mrp-custom-icon.zip)
paulloz commented 1 month ago

Hello, and thank you for the report.

I'd be curious to know if this is specific to C#, or if it is the same behaviour in GDScript / other languages.

Giganzo commented 1 month ago

I'd be curious to know if this is specific to C#, or if it is the same behaviour in GDScript / other languages.

Looks to be the same for gdscript too.

customicon.zip