Class TextureUtils
Inheritance
Inherited Members
Namespace: LLBML.Texture
Assembly: LLBModdingLib.dll
Syntax
public static class TextureUtils
Methods
DefaultTexture(Int32, Int32, TextureFormat)
Returns a default texture with optional size.
Declaration
public static Texture2D DefaultTexture(int width = 512, int height = 512, TextureFormat format = TextureFormat.RGBA32)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | width | New texture's width. |
| System.Int32 | height | New texture's height. |
| UnityEngine.TextureFormat | format | New texture's format. |
Returns
| Type | Description |
|---|---|
| UnityEngine.Texture2D | The texture. |
LoadDDS(FileInfo)
Loads a dds from a file and returns it.
Declaration
public static Texture2D LoadDDS(FileInfo file)
Parameters
| Type | Name | Description |
|---|---|---|
| System.IO.FileInfo | file | The dds file to load. |
Returns
| Type | Description |
|---|---|
| UnityEngine.Texture2D | The loaded texture. |
Remarks
Loads the asset into memory, you should only load it once.
Look into
LoadDDS(String)
Loads a dds from a file and returns it.
Declaration
public static Texture2D LoadDDS(string filePath)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | filePath |
Returns
| Type | Description |
|---|---|
| UnityEngine.Texture2D | The loaded texture. |
Remarks
Loads the asset into memory, you should only load it once.
Look into
LoadPNG(FileInfo)
Loads a png from a file and returns it.
Declaration
public static Texture2D LoadPNG(FileInfo file)
Parameters
| Type | Name | Description |
|---|---|---|
| System.IO.FileInfo | file | The png file to load. |
Returns
| Type | Description |
|---|---|
| UnityEngine.Texture2D | The loaded texture. |
Remarks
Loads the asset into memory, you should only load it once.
Look into
LoadPNG(String)
Loads a png from a file and returns it.
Declaration
public static Texture2D LoadPNG(string filePath)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | filePath |
Returns
| Type | Description |
|---|---|
| UnityEngine.Texture2D | The loaded texture. |
Remarks
Loads the asset into memory, you should only load it once.
Look into
LoadTexture(FileInfo)
Loads a file and returns a texture from it.
Declaration
public static Texture2D LoadTexture(FileInfo file)
Parameters
| Type | Name | Description |
|---|---|---|
| System.IO.FileInfo | file | The file to load. |
Returns
| Type | Description |
|---|---|
| UnityEngine.Texture2D | The loaded texture. |
Remarks
Loads the asset into memory, you should only load it once.
Look into
LoadTexture(String)
Loads a file and returns a texture from it.
Declaration
public static Texture2D LoadTexture(string filePath)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | filePath |
Returns
| Type | Description |
|---|---|
| UnityEngine.Texture2D | The loaded texture. |
Remarks
Loads the asset into memory, you should only load it once.
Look into