The Icon Size is a Scriptable Object (SO) used to control the size of item icons within the Grid Inventory or a Holder. By customizing the Icon Size, you can easily manage the dimensions and positioning of item icons.
To create an Icon Size, follow these steps using Unity's default creation file system:
Create the Icon Size Scriptable Object:
Creating Icon Size using the Unity creation file systemLoading image
The filename convention is IconSize_WIDTH_HEIGHT or IconSize_WIDTH_HEIGHT_PosX_PosY. This naming makes it easier to identify the Icon Size with the correct width, height, position X, and position Y.
Once you have created the Icon Size, you can apply it to an ItemDataSO:
Setting Item Data SO with Icon SizeLoading image
In the Images Configuration area, you can specify the icon size for different contexts:
Icon Size SO: Sets the size of the item icon when it is inside a Grid Inventory.
In Holder Icon Size SO: Sets the size of the item icon when it is equipped in a Holder.
Images ConfigurationsLoading image
After configuring all settings, create or update the Icon Size, then hit play to see your changes in action!
With these steps, you can effectively manage and customize the size and position of item icons to fit your inventory and holder setup. This ensures that your UI remains clean and consistent with your design requirements.
Go to the next page to continue with your inventory setup and explore more features!