Class PrefabTemplate
- Namespace
- Nautilus.Assets.PrefabTemplates
- Assembly
- Nautilus.dll
Represents the contract for a prefab template.
public abstract class PrefabTemplate
- Inheritance
-
PrefabTemplate
- Derived
- Inherited Members
- Extension Methods
Constructors
PrefabTemplate(PrefabInfo)
Constructs a prefab template.
public PrefabTemplate(PrefabInfo info)
Parameters
infoPrefabInfo- The prefab info to base this template off of.
Fields
info
The prefab info to operate on.
protected readonly PrefabInfo info
Field Value
Methods
GetPrefabAsync(TaskResult<GameObject>)
Gets a prefab of this template type. The returned object can be accessed via TaskResult<T>.Get().
public abstract IEnumerator GetPrefabAsync(TaskResult<GameObject> gameObject)
Parameters
gameObjectTaskResult<GameObject>- The prefab computation result is set into this argument.
If the provided task result already has a game object set to it, it will try to set the necessary components first. Otherwise; sets a default implementation of this entity type.
Returns
- IEnumerator
- A coroutine operation. Must be used with either
yield return, or StartCoroutine(IEnumerator).
OnPrefabPostProcessor(GameObject)
Use this method to make changes to the prefab after the Nautilus' prefab processing is completed. Can be used to override or add more features to a prefab once it's settled.
public virtual IEnumerator OnPrefabPostProcessor(GameObject prefab)
Parameters
prefabGameObject- The prefab to process.
Returns
- IEnumerator
- A coroutine operation.