Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


GetPropertyModifications(Object)

Returns all modifications that have been applied to a particular prefab instance in a scene or modifications for a prefab instance in an asset.
Read time 1 minuteLast updated 4 days ago

Definition

  • Type: Method
  • Namespace: UnityEditor
  • Assembly: UnityEditor
public static PropertyModification[] GetPropertyModifications(Object targetPrefab)

Parameters

targetPrefab

Can be a Prefab instance in the scene or a Prefab instance in an Prefab Asset (e.g a Variant asset).

Returns

Type

Description

PropertyModification[]

Remarks

This method returns an array of PropertyModification objects that represent all modifications that have been applied to the given Prefab instance.
For details about the fields of the returned PropertyModification objects, refer to SetPropertyModifications .
Alternatively, use GetObjectOverrides, which has Apply and Revert functionality to get property overrides information for a prefab instance.
GetPropertyModifications has the following limitations:
  • It returns both default and non-default overrides.
  • It returns overrides for all child GameObjects and their components.
  • It returns overrides that are no longer valid.
  • It can return null.