Version: 2022.3
LanguageEnglish
  • C#
Method group is Obsolete

PrefabUtility.CreateEmptyPrefab

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Obsolete The concept of creating a completely empty Prefab has been discontinued. You can however use SaveAsPrefabAsset with an empty GameObject.

Declaration

public static Object CreateEmptyPrefab(string path);

Parameters

path The asset path to use for the new empty Prefab.

Returns

Object A reference to the new Prefab Asset.

Description

Creates an empty Prefab at given path.

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