ObjectPool.

GetFunctionToInstantiatePrefab(GameObject) Method

Summary

Creates a delegate that instantiates an inactive copy of the `original` object and calls UnityEngine.Object.DontDestroyOnLoad(UnityEngine.Object) on it.

In the Unity Editor the copies are also grouped under a parent object to keep the hierarchy view clean.
Assembly
Weaver.dll
Namespace
Weaver
Containing Type
ObjectPool

Syntax

public static Func<GameObject> GetFunctionToInstantiatePrefab(GameObject original)

Parameters

Name Type Description
original GameObject

Return Value

Type Description
Func<GameObject>