LoadImage - Aidanamite/AssetsLib GitHub Wiki

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 filename This is the name of an image file in your project's embedded resources

  • int width The width of the image you're loading (in pixels)

  • int height The height of the image you're loading (in pixels)

Example:

Texture2D myItemImage = AssetLib.AssetLibTools.LoadImage("MyItem.png",32,32);