Table of Contents

Class ModPrefabCache

Namespace
Nautilus.Assets
Assembly
Nautilus.dll
Class used by PrefabInfo to store game objects that used as prefabs. Game objects in cache are inactive and will not be on scene.
public static class ModPrefabCache
Inheritance
ModPrefabCache
Inherited Members

Methods

AddPrefab(GameObject, bool)

Add prefab to cache
public static void AddPrefab(GameObject prefab, bool autoremove = true)

Parameters

prefab GameObject
Prefab to add.
autoremove bool
Is prefab needed to be removed from cache after use. Prefabs without autoremove flag can be safely deleted by UnityEngine.Object.Destroy(UnityEngine.Object)

AddPrefabCopy(GameObject, bool)

Add prefab copy to cache (instatiated copy will not run 'Awake')
public static GameObject AddPrefabCopy(GameObject prefab, bool autoremove = true)

Parameters

prefab GameObject
Prefab to copy and add.
autoremove bool
Is prefab copy needed to be removed from cache after use. Prefabs without autoremove flag can be safely deleted by UnityEngine.Object.Destroy(UnityEngine.Object)

Returns

GameObject
Prefab copy