C# Class FullInspector.Internal.fiPrefabTools

Utility functions for working with prefab overrides.
Mostrar archivo Open project: jacobdufault/fullinspector

Public Methods

Method Description
HasPrefabDiff ( object instance, FullInspector.Internal.InspectedProperty property ) : bool

Returns true if the given property on the given object instance has a prefab override.

Currently, this method only works for MonoBehavior targets.

RevertValue ( object instance, FullInspector.Internal.InspectedProperty property ) : void

Reverts the given property on the instance to the prefab value.

Private Methods

Method Description
ContainsPropertyName ( string propertyPath, string propertyName ) : bool

Returns true if the period separate property path contains the given property name.

TryExtractPropertyName ( ISerializedObject obj, PropertyModification mod, string &keyName ) : bool

Attempts to extract the name of serialized key for the given property modification.

Method Details

HasPrefabDiff() public static method

Returns true if the given property on the given object instance has a prefab override.
Currently, this method only works for MonoBehavior targets.
public static HasPrefabDiff ( object instance, FullInspector.Internal.InspectedProperty property ) : bool
instance object The object instance.
property FullInspector.Internal.InspectedProperty The property to check.
return bool

RevertValue() public static method

Reverts the given property on the instance to the prefab value.
public static RevertValue ( object instance, FullInspector.Internal.InspectedProperty property ) : void
instance object /// The prefab instance to revert the value on. ///
property FullInspector.Internal.InspectedProperty The property to revert.
return void