ObjectPool.

GetFunctionToInstantiateComponent<T>(T) 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<T> GetFunctionToInstantiateComponent<T>(T original) where T : Component

Type Parameters

Name Description
T

Parameters

Name Type Description
original T

Return Value

Type Description
Func<T>