Skip to main content

HashedGeneralValuesWarmer

A class in Root.Township, the global namespace.

Startup component that loads the hashed item, material and page collection tables and a list of prefabs over several frames, to avoid a stall later.

Constructors​

MemberWhat it is
HashedGeneralValuesWarmer()Unity makes components itself; use AddComponent or spawn a prefab instead of new.

Fields​

2 private and internal fields
MemberWhat it is
private float frameMillisecondAllowanceMilliseconds of prefab loading allowed per frame.
private uint[] prefabsToWarmHashes of prefabs to load early.

Methods​

3 private and internal methods
MemberWhat it is
private async void Awake()Runs Initialize and then WarmPrefabs.
private async Task Initialize()Loads the Item, PhysicalMaterial and PageCollection tables and the pickup type dictionary, yielding a frame between each.
private async Task WarmPrefabs()Loads each listed prefab, yielding a frame whenever the time budget is used up.