Streaming
When you stream textures, Xenko only loads them when they're needed. This significantly decreases the time it takes to load a game or scene, uses less memory, and makes your game easier to scale.
Note
Currently, only textures can be streamed.
Instead of loading a texture when Xenko loads the scene (with all its mipmaps), Xenko only loads it when it's used (eg a model using the texture is onscreen).
When the texture is no longer needed (ie no objects that use the texture are onscreen), Xenko unloads it.
Currently, there's no loading priority for textures. For example, Xenko doesn't load textures based on distance; instead, Xenko loads them all in sequence.
If mipmaps (different-resolution versions of textures displayed at different distances) are enabled in the , the lower-resolution mipmaps load first, as they're smaller in size. The gif below shows this process happening in slow motion.
In most situations, the process is very quick. We recommend you enable mipmaps for streaming as it means lower-resolution versions of textures act as placeholders until the higher-quality versions can load, reducing pop-in.
When not to use streaming
textures on player models
textures used in (particles often have a short lifespan, so might disappear before the texture loads)
- In the Property Grid, under Format, use the Stream check box.
Global streaming settings
You can access the global streaming settings in the Game Settings asset. These settings apply to all textures that have streaming enabled.
For instructions about how to access the global streaming settings, see the Game Settings page.
For example, to disable streaming globally, use:
To start streaming a texture:
To disable streaming at load time:
There are three :
The option keeps the texture in memory even when the memory budget is exceeded.
If mipmaps are enabled, the option loads only the highest-quality version of the texture.
The option keeps the texture in memory even when it's not used.
For example: