Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thundernerd/unity3d-iconmanager
A small script allowing you to set icons for GameObjects through code
https://github.com/thundernerd/unity3d-iconmanager
Last synced: about 2 months ago
JSON representation
A small script allowing you to set icons for GameObjects through code
- Host: GitHub
- URL: https://github.com/thundernerd/unity3d-iconmanager
- Owner: Thundernerd
- License: mit
- Created: 2016-06-28T17:00:15.000Z (over 8 years ago)
- Default Branch: main
- Last Pushed: 2023-04-01T12:59:51.000Z (over 1 year ago)
- Last Synced: 2024-08-03T05:19:31.727Z (5 months ago)
- Language: C#
- Homepage:
- Size: 14.6 KB
- Stars: 66
- Watchers: 8
- Forks: 12
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
Awesome Lists containing this project
README
# Icon Manager
Icon Manager is a small utility that allows you to set icons on GameObjects through code.
## Installation
1. The package is available on the [openupm registry](https://openupm.com). You can install it via [openupm-cli](https://github.com/openupm/openupm-cli).
```
openupm add net.tnrd.iconmanager
```
2. Installing through a [Unity Package](http://package-installer.glitch.me/v1/installer/package.openupm.com/net.tnrd.iconmanager?registry=https://package.openupm.com) created by the [Package Installer Creator](https://package-installer.glitch.me) from [Needle](https://needle.tools)[](http://package-installer.glitch.me/v1/installer/package.openupm.com/net.tnrd.iconmanager?registry=https://package.openupm.com)
## Usage
Here's how you use the IconManager
```c#
private void Foo()
{
GameObject gameObject = FetchGameObject();
IconManager.SetIcon(gameObject, LabelIcon.Teal);
}
```Or by using an extension for GameObjects
```c#
private void Foo()
{
GameObject gameObject = FetchGameObject();
gameObject.SetIcon(ShapeIcon.CircleGreen);
}
```Removing an icon is also possible; both through the IconManager and via an extension method
```c#
private void Foo()
{
GameObject gameObject = FetchGameObject();IconManager.RemoveIcon(gameObject);
// or
gameObject.RemoveIcon();
}
```## Support
**Icon Manager** is a small and open-source utility that I hope helps other people. It is by no means necessary but if you feel generous you can support me by donating.[![ko-fi](https://www.ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/J3J11GEYY)
## Contributing
Pull requests are welcomed. Please feel free to fix any issues you find, or add new features.