A class in Root.Township, the global namespace.
Scene root component that warms up shader variant collections for the active platform so shaders don't compile mid-game. AltaSceneManager calls Warm on it when a scene loads.
Constructors
| Member | What it is |
|---|
ShaderVariantWarmer() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
3 private and internal fields
| Member | What it is |
|---|
private ShaderVariantWarmer.PlatformCollection[] collectionsToWarm | Per-platform sets of shader variant collections to warm. |
private bool isWarm | Set on the first Warm call so warming only runs once. |
private static Logger logger | NLog logger used to log how long each collection took to warm. |
Properties
| Member | What it is |
|---|
int SortingOrder { get; } | Bake order for the build pipeline. Always 0. |
Methods
| Member | What it is |
|---|
void Bake(bool isSaving) | Build step: on Linux (the server build) drops all collections; otherwise prepares each platform's runtime collection list. |
void Clean() | Empty bake clean-up step. |
async Task Warm() | Warms each platform collection once, yielding between them. Later calls do nothing. |
1 private and internal method
| Member | What it is |
|---|
private void Start() | Calls Warm when the object starts. |