기술 자료

Unity Engine

Unity Engine

GetPrefabParent(Object)

Returns the parent asset object of source, or null if it can't be found.
읽는 시간 1분최근 업데이트: 한 달 전

Definition

  • Type: Method
  • Namespace: UnityEditor
  • Assembly: UnityEditor
경고
Deprecated. Use GetCorrespondingObjectFromSource.
public static Object GetPrefabParent(Object obj)

Parameters

Returns

Type

Description

Object

Remarks

Use this function to get a Prefab Asset object the
source
was instantiated from. This also returns the Prefab parent if the Prefab has become disconnected, which can then be used to reconnect the Prefab.