Class PrefabManager.Cache
Global cache of Unity Objects by asset name.
Built on first access of every type and is cleared on scene change.
Built on first access of every type and is cleared on scene change.
Inherited Members
Namespace: Jotunn.Managers
Assembly: Jotunn.dll
Syntax
public static class PrefabManager.Cache
Methods
Name | Description |
---|---|
Clear() | Clears the entire cache, resulting in a rebuilt on the next access. This can be useful if an asset is loaded late after a scene change and might be missing in the cache. Rebuilding can be an expensive operation, so use with caution. |
Clear<T>() | Clears the cache for a specific type, resulting in a rebuilt on the next access. This can be useful if an asset is loaded late after a scene change and might be missing in the cache. Rebuilding can be an expensive operation, so use with caution. |
GetPrefab(Type, string) | Get an instance of an Unity Object from the current scene with the given name. |
GetPrefab<T>(string) | Get an instance of an Unity Object from the current scene by name. |
GetPrefabs(Type) | Get all instances of an Unity Object from the current scene by type. |