Skip to content

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 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);

Clone this wiki locally