Documentation
Import
Use Unity's Package Manager to download and import the asset into your project. Once imported, the asset will be inside Assets/ARB/TextureLoader.
Setup
Setup TextureLoader by opening the Settings Panel from the "Window > TextureLoader" menu and selecting "Settings".

Namespace
Import TextureLoader's namespace in all scripts you want to use it:
Usage
Always call Dispose() or DisposeAll() methods when textures are no longer needed to avoid memory leaks.
Sample - Basic
Sample - Target
Use the Into() method to load the texture into one of the supported targets:
UnityEngine.Renderer
UnityEngine.SpriteRenderer
UnityEngine.UI.Image
UnityEngine.UI.RawImage
UnityEngine.UIElements.VisualElement
UnityEngine.UIElements.Image
Check the Customize section to override or create a new target.
Sample - UIToolkit
Sample - Advanced
Sample - No references
Codeless
Don't want or don't need to write code? Use the included components to load textures without writing any code!
Check the Customize section to override or create a new codeless component.




Customize
TextureLoader allows extending and customizing parts of its main functionality without having to modify the source code.
Targets
Targets are Unity components capable of rendering textures. TextureLoader can apply loaded textures to these targets through the Into(TextureTarget target) method.
Override the included targets or create your own by inheriting from the TextureTarget class or any of its subclasses:
Your target is now ready to use:
Placeholders
Placeholders are game objects that can be optionally displayed during a loading operation when the texture is set to load into a target.
Override the included placeholders or create your own by inheriting from the Placeholder class or any of its subclasses:
In order to use your new placeholder either override one of the included texture targets or create a new one. Here's an example overriding an existing texture target:
Optionally implement an extension method:
Codeless components
Codeless components are those that can be attached to game objects with a texture renderer to load a texture without writing any code.
Override the included loader components or create your own by inheriting from the TargetTextureLoader class or any of its subclasses:
Last updated