The SDK contains some built-in icons to be used as Floating Icon. It also provides way to import custom SVG icons.
You need to gather the PNG file and SVG data first before importing the icons. Use https://fontawesome.com/search to find the icon you like. Then download the PNG file from https://fa2png.app/.
Once you found the icon you like from https://fontawesome.com/search. Try find it from https://fa2png.app/ and download the corresponding PNG file.
Back to Unity Editor, and select the Treasured Object that you want to assign the icon. Expand the Icon
dropdown and click on the menu besides asset
field.
Menu Option | Description |
---|---|
Import Custom Icon | Import single PNG file and create Icon Asset based on that. |
Import Custom Icons from Folder | Import multiple PNG files from a folder and create Icon Assets based on the files. |
Set Custom Icons Folder | Set custom icons folder for your computer. You can store all your custom icons PNG files here. |
Update Icons from Custom Icons Folder | Automatically import all PNG files under custom icons folder. |
Caution! Image file with same content will be skipped, but file with same name and different content will be overwritten and the SVG data will be GONE.
Go back to https://fontawesome.com/ and Copy SVG code
from the selected icon and paste it into SVG
field in the Icon Asset that you just imported.
All imported custom icon will be stored under Assets/Treasured SDK/Icons
.
You can now pick the icon for the asset
field. This will creates a game object under the Treasured Object you selected and assign it’s transform to be used for the Icon.
You can create Icon Asset by right click on a folder under Assets
in the Project
window. It’s recommended to put all Icon Assets under Assets/Treasured SDK/Icons
folder. Select Create > Treasured SDK > Create Icon Asset
to create a blank Icon Asset. Select texture and provide SVG data for the Icon.