Legacy Documentation: Version 4.5.0

Script language:

  • JS
  • C#
  • Boo
Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

PrefabUtility.InstantiateAttachedAsset

static function InstantiateAttachedAsset(targetObject: Object): Object;
static Object InstantiateAttachedAsset(Object targetObject);
static def InstantiateAttachedAsset(targetObject as Object) as Object

Description

Instantiate an asset that is referenced by a prefab and use it on the prefab instance.