AsImpL 1.0
Asynchronous Importer and run-time Loader for Unity
AsImpL.TextureLoader Class Reference

Class for loading textures files into Unity scene at run-time and in editor mode. More...

Inheritance diagram for AsImpL.TextureLoader:

Static Public Member Functions

static Texture2D LoadTextureFromUrl (string url)
 Load an image from a file into a Texture2D. More...
 
static Texture2D LoadTexture (string fileName)
 Load an image from a file into a Texture2D. More...
 
static Texture2D LoadTGA (string fileName)
 Load a TGA image from a file into a Texture2D. More...
 
static Texture2D LoadDDSManual (string ddsPath)
 Load a DDS image from a file into a Texture2D. More...
 
static Texture2D LoadTGA (Stream TGAStream)
 Load a TGA image from a stram into a Texture2D. More...
 

Properties

static IFilesystem Filesystem [getset]
 

Detailed Description

Class for loading textures files into Unity scene at run-time and in editor mode.

Derived from "Runtime OBJ Loader" (http://forum.unity3d.com/threads/free-runtime-obj-loader.365884/) and from "runtime .OBJ file loader for Unity3D" (https://github.com/hammmm/unity-obj-loader) and (https://github.com/cmdr2/unity-remote-obj-loader)

Member Function Documentation

◆ LoadDDSManual()

static Texture2D AsImpL.TextureLoader.LoadDDSManual ( string  ddsPath)
static

Load a DDS image from a file into a Texture2D.

Parameters
ddsPathfile name of the image to load
Returns
The loaded texture or null on error.

◆ LoadTexture()

static Texture2D AsImpL.TextureLoader.LoadTexture ( string  fileName)
static

Load an image from a file into a Texture2D.

Parameters
fileNamefile name of the image to load
Returns
The loaded texture or null on error.

◆ LoadTextureFromUrl()

static Texture2D AsImpL.TextureLoader.LoadTextureFromUrl ( string  url)
static

Load an image from a file into a Texture2D.

Parameters
urlURL of the texture image.
Returns
The loaded texture or null on error.

◆ LoadTGA() [1/2]

static Texture2D AsImpL.TextureLoader.LoadTGA ( Stream  TGAStream)
static

Load a TGA image from a stram into a Texture2D.

Parameters
TGAStreaminput stream
Returns
The loaded Texture2D

This directly comes from the code submitted by aaro4130 and edited by ALLCAPS on the Unity forums (thanks to all!). https://forum.unity3d.com/threads/tga-loader-for-unity3d.172291/

◆ LoadTGA() [2/2]

static Texture2D AsImpL.TextureLoader.LoadTGA ( string  fileName)
static

Load a TGA image from a file into a Texture2D.

Parameters
fileNamefile name of the image to load
Returns
The loaded texture or null on error.

Property Documentation

◆ Filesystem

IFilesystem AsImpL.TextureLoader.Filesystem
staticgetset

The documentation for this class was generated from the following file: