Check out our latest project ✨ OpenChapter.io: free ebooks the way its meant to be 📖

AnyIcon: type and class icons utility

An asset by Patou
The page banner background of a mountain and forest
AnyIcon: type and class icons utility hero image

Quick Information

0 ratings
AnyIcon: type and class icons utility icon image
Patou
AnyIcon: type and class icons utility

A singleton providing easy access to icons representing classes and types, from values or members. Useful for addon developers.This is NOT a GUI, it's a GDScript utility. If you are looking for a GUI to look up editor icons, you may want to use Yuri Sizov's Godot Editor Theme Explorer:https://godotengine.org/asset-library/asset/2353Note: In 4.3, there will be a few warnings at installation due to script UIDs that were introduced in 4.4.1.1 changelog summary:- Added methods to get a member's type icon.- Improved robustnessFull changelogs: https://github.com/xorblo-doitus/AnyIcon/releases

Supported Engine Version
4.3
Version String
1.1.1
License Version
MIT
Support Level
community
Modified Date
3 months ago
Git URL
Issue URL

AnyIcon: type and class icons utility

README Addon's icon

A utility singleton providing an easy way to get the icon of any value (Node, custom class, bool, int...)

This is not a GUI, it's a GDScript utility. If you look for a GUI to look up editor icons, you may want to use Godot Editor Theme Explorer.

Features / How to use

The main method provided by AnyIcon is get_variant_icon(any_value: Variant). It's a static method that returns the icon associated with the passed value. It can handle any value, from built-in types (bool, int, Packed*Array), to custom classes with @icon("path") specified.

There are more specific methods too, that you can use if you already know if the value you pass is a built-in type, a built-in class or a custom class.

Every method accepts an optional fallback parameter, which is the name of the icon that will be fetched from the "EditorIcons" theme type in case no icon is found for a type (this is very unlikely to happen, since all types are covered and classes will at least inherit Object and thus it's icon)

You can look at the documentation generated by Godot for more information. (By default: F1 then search for AnyIcon.)

Installation

You can download the addon:

  • On GitHub: CodeDownload ZIP.
  • Through the editor: AssetLib → Search for "AnyIcon"

You can exclude *.editor/* or any_icon.editor/ from your export presets, because this addon is editor-only.

Examples

I will soon use this utility in TileSet Clipboard and BBCodeEdit. (In fact, this addon is a refactor of a script from BBCodeEdit, so you can already look at how it's used here)

Godot version

Godot version: 4.3+

Note: In 4.3, there will be a few warnings at installation due to script UIDs that were introduced in 4.4.

Won't work with 4.2 due to missing methods required by this addon.

Development Status

LTS (Only bug fixes)

A singleton providing easy access to icons representing classes and types, from values or members. Useful for addon developers.

This is NOT a GUI, it's a GDScript utility. If you are looking for a GUI to look up editor icons, you may want to use Yuri Sizov's Godot Editor Theme Explorer:
https://godotengine.org/asset-library/asset/2353

Note: In 4.3, there will be a few warnings at installation due to script UIDs that were introduced in 4.4.


1.1 changelog summary:
- Added methods to get a member's type icon.
- Improved robustness

Full changelogs: https://github.com/xorblo-doitus/AnyIcon/releases

Reviews

0 ratings

Your Rating

Headline must be at least 3 characters but not more than 50
Review must be at least 5 characters but not more than 500
Please sign in to add a review

Quick Information

0 ratings
AnyIcon: type and class icons utility icon image
Patou
AnyIcon: type and class icons utility

A singleton providing easy access to icons representing classes and types, from values or members. Useful for addon developers.This is NOT a GUI, it's a GDScript utility. If you are looking for a GUI to look up editor icons, you may want to use Yuri Sizov's Godot Editor Theme Explorer:https://godotengine.org/asset-library/asset/2353Note: In 4.3, there will be a few warnings at installation due to script UIDs that were introduced in 4.4.1.1 changelog summary:- Added methods to get a member's type icon.- Improved robustnessFull changelogs: https://github.com/xorblo-doitus/AnyIcon/releases

Supported Engine Version
4.3
Version String
1.1.1
License Version
MIT
Support Level
community
Modified Date
3 months ago
Git URL
Issue URL

Open Source

Released under the AGPLv3 license

Plug and Play

Browse assets directly from Godot

Community Driven

Created by developers for developers