ドキュメント

Unity Engine

Unity Engine

RevertPrefabInstance

Reverts all overrides on a Prefab instance.
読み終わるまでの所要時間 1 分最終更新 1ヶ月前

Definition

  • Type: Method
  • Namespace: UnityEditor
  • Assembly: UnityEditor.CoreModule

RevertPrefabInstance(GameObject)

Reverts all overrides on a Prefab instance.
注意
Deprecated. Use the overload that takes an InteractionMode parameter.
public static bool RevertPrefabInstance(GameObject go)

Parameters

Returns

Type

Description

bool

Remarks

This reverts all property overrides, added and removed components, and added child GameObjects (including added child Prefab instances).
The Transform position and rotation of a root GameObject in a Prefab instance is not cleared, nor are other default override properties.

RevertPrefabInstance(GameObject, InteractionMode)

Reverts all overrides on a Prefab instance.
public static void RevertPrefabInstance(GameObject instanceRoot, InteractionMode action)

Parameters

instanceRoot

The root of the Prefab instance.

The interaction mode for this action.

Remarks

This reverts all property overrides, added and removed components, and added child GameObjects (including added child Prefab instances).
The Transform position and rotation of a root GameObject in a Prefab instance is not cleared, nor are other default override properties.