Show / Hide Table of Contents

Method GetPrefab

| Edit this page View Source

GetPrefab(Type, string)

Get an instance of an Unity Object from the current scene with the given name.
Declaration
public static UnityEngine.Object GetPrefab(Type type, string name)
Parameters
Type Name Description
Type type Type to search for.
string name Name of the actual object to search for.
Returns
Type Description
Object
| Edit this page View Source

GetPrefab<T>(string)

Get an instance of an Unity Object from the current scene by name.
Declaration
public static T GetPrefab<T>(string name) where T : UnityEngine.Object
Parameters
Type Name Description
string name
Returns
Type Description
T
Type Parameters
Name Description
T
  • Edit this page
  • View Source
☀
☾
In this article
Back to top
Generated by DocFX
☀
☾