Interface IPrefabFactory
Prefab factories can be registered to AssetPacks to supplement their ability to instantiate prefabs
Namespace: Unity.RuntimeSceneSerialization.Prefabs
Syntax
public interface IPrefabFactory
Methods
TryInstantiatePrefab(String, Transform)
Try to instantiate a prefab with the given guid
Declaration
GameObject TryInstantiatePrefab(string guid, Transform parent = null)
Parameters
Type | Name | Description |
---|---|---|
String | guid | The guid of the prefab that should be instantiated |
Transform | parent | The parent object to use when calling Instantiate |
Returns
Type | Description |
---|---|
GameObject | The prefab instance, if one was created |