Interface IPrefabBuilder
IPrefabBuilder is an interface to create Prefab AssetReference from incoming asset group. Subclass of IPrefabBuilder must have CUstomPrefabBuilder attribute.
Namespace: UnityEngine.AssetGraph
Syntax
public interface IPrefabBuilder
Methods
CanCreatePrefab(String, List<Object>, ref PrefabCreateDescription)
Determines whether this instance can create prefab with the specified groupKey objects.
Declaration
bool CanCreatePrefab(string groupKey, List<object> objects, ref PrefabCreateDescription description)
Parameters
Type | Name | Description |
---|---|---|
String | groupKey | Group key. |
List<Object> | objects | list of Objects passed from node to create a prefab. |
PrefabCreateDescription | description | Prefab descriptions to create with this IPrefabBuilder. if the method is returning true, valid descriptions should be set. |
Returns
Type | Description |
---|---|
Boolean |
|
CreatePrefab(String, List<Object>, GameObject)
Creates the prefab.
Declaration
GameObject CreatePrefab(string groupKey, List<object> objects, GameObject previous)
Parameters
Type | Name | Description |
---|---|---|
String | groupKey | Group key. |
List<Object> | objects | Objects. |
GameObject | previous | Previous prefab. |
Returns
Type | Description |
---|---|
GameObject | The prefab. |
OnInspectorGUI(Action)
Draw Inspector GUI for this PrefabBuilder.
Declaration
void OnInspectorGUI(Action onValueChanged)
Parameters
Type | Name | Description |
---|---|---|
Action | onValueChanged | On value changed. |
OnValidate()
Called when validating this prefabBuilder. NodeException should be thrown if this modifier is not ready to be used for building.
Declaration
void OnValidate()