1.14.0.5
Hummingbird
A modern user interface library for games
Preloaded Images

Image preloading is a feature of Hummingbird that allows developers to use textures loaded on the GPU for their UI. Image preloading also allows to specify content rectangle where the actual image is. This can be used if the image has padding or is part of a texture atlas.

This lets you achieve the following use cases:

  • Improve the loading time of pages by preparing the textures in advance instead loading them on request.
  • Reduce memory footprint when the engine and the UI share textures, by having the texture stored in GPU memory only once, instead of twice (once for the engine and once for Hummingbird).
  • Use custom image formats.
  • Make use of Unity's texture compressing to save space and memory.
Note
Hummingbird expects all textures to have premultiplied alpha, keep that in mind when loading the images.

All images that are going to be used as preloaded must be located at Assets/Resources/Hummingbird/SharedImages. All images should be placed at the root level of this directory. The resource handler in Unity will search that path first when Hummingbird requests an image. Unity will ensure that any textures found in that folder are loaded and they will be shared for use with Hummingbird.