Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


CreateEmptyPrefab(string)

Creates an empty Prefab at given path.
Read time 1 minuteLast updated 5 days ago

Definition

  • Type: Method
  • Namespace: UnityEditor
  • Assembly: UnityEditor.CoreModule
Warning
Deprecated. The concept of creating a completely empty Prefab has been discontinued. You can however use SaveAsPrefabAsset with an empty GameObject.
public static Object CreateEmptyPrefab(string path)

Parameters

path

The asset path to use for the new empty Prefab.

Returns

Type

Description

ObjectA reference to the new Prefab Asset.

Remarks

If a Prefab at the path already exists it will be deleted and replaced with an empty Prefab. Returns a reference to the Prefab.