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

Unable to load the icon: 'd_winbtn_win_close' on Mac #52

Open
noio opened this issue May 2, 2024 · 2 comments
Open

Unable to load the icon: 'd_winbtn_win_close' on Mac #52

noio opened this issue May 2, 2024 · 2 comments

Comments

@noio
Copy link

noio commented May 2, 2024

First off, I love this package and its philosophy, I've only just begun using it but having a generic visualization/editor for graph based data is just amazing. Unity should have this built in. Thanks so much for sharing this with your fellow game devs 🙏

This is just a tiny bug that I'm seeing, it's also not affecting the workflow in any way, I think:

When opening a graph, an error is thrown because Unity can't find the icon d_winbtn_win_close.
Which makes sense, as I assume that's a windows only icon.

I normally wouldn't open an issue for mac specific issues, that just might not be a target platform for this package.

But I see you're beautifully handling some Mac specific stuff already! (e.g. showing the char for the Command key) 💕

Below is the full stack trace:
(again, this occurs when opening a graph)

[Error] Unable to load the icon: 'd_winbtn_win_close'.
Note that either full project path should be used (with extension) or just the icon name if the icon is located in the following location: 'Assets/Editor Default Resources/Icons/' (without extension, since png is assumed)
EditorGUIUtility.IconContent()

NewGraph.EditableLabelElement..ctor() at ./Library/PackageCache/com.gentlymad.newgraph@d41b4e6e29/Editor/Views/Elements/EditableLabelElement.cs:32

NewGraph.ScriptableInspectorControllerGeneric`1<NewGraph.ScriptableGraphModel>.CreateRenameGraphUI() at ./Library/PackageCache/com.gentlymad.newgraph@d41b4e6e29/Editor/Controllers/ScriptableInspectorControllerGeneric.cs:113

InspectorControllerBase.Draw() at ./Library/PackageCache/com.gentlymad.newgraph@d41b4e6e29/Editor/Controllers/InspectorControllerBase.cs:218

GraphController.Draw() at ./Library/PackageCache/com.gentlymad.newgraph@d41b4e6e29/Editor/Controllers/GraphController.cs:534

GraphWindow.OnGUI() at ./Library/PackageCache/com.gentlymad.newgraph@d41b4e6e29/Editor/Views/GraphWindow.cs:123

GUIUtility.ProcessEvent() at /Users/bokken/build/output/unity/unity/Modules/IMGUI/GUIUtility.cs:206
@noio
Copy link
Author

noio commented May 2, 2024

Update: I think a fix could be as simple as the following line in EditableLabelElement.cs :

Screenshot 2024-05-02 at 10 23 10

@noio
Copy link
Author

noio commented May 2, 2024

Hm okay another update:

I am actually not sure which "OS button icons" are still available in Unity 2023.

Maybe the issue is not Win vs Mac but more that Unity is no longer including any OS-specific icons in 2023?

This list contains winbtn_win and winbtn_mac variants, but when I examine the icons in my (2023) Unity, using Internal Icon Browser, then I'm actually not seeing any winbtn icons.

Perhaps if you're looking to just show a simple cross, it's safer to just use d_clear ?

Screenshot 2024-05-02 at 10 28 29

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

No branches or pull requests

1 participant