-
Notifications
You must be signed in to change notification settings - Fork 0
LoadImage
Aidanamite edited this page Oct 11, 2021
·
2 revisions
Description:
Fetches an image from your mod's embedded resources using its file name. Can be used with CreateSprite to create a sprite for an item
Returns: Texture2D
Arguments:
-
string filenameThis is the name of an image file in your project's embedded resources -
int widthThe width of the image you're loading (in pixels) -
int heightThe height of the image you're loading (in pixels)
Example:
Texture2D myItemImage = AssetLib.AssetLibTools.LoadImage("MyItem.png",32,32);