Show / Hide Table of Contents

Class EditorHelper

EditorHelper class provides methods for working with serialzed properties. Methods in this class are based on the spacepuppy-unity-framework, available at the url below. https://github.com/lordofduct/spacepuppy-unity-framework/tree/d8d592e212b26cad53264421d22c3d26c6799923/SpacepuppyBaseEditor.

Inheritance
System.Object
EditorHelper
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ToString()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace:Mapbox.Editor
Assembly:cs.temp.dll.dll
Syntax
public static class EditorHelper

Methods

CheckForModifiedProperty(SerializedProperty, Boolean)

Declaration
public static void CheckForModifiedProperty(SerializedProperty property, bool forceHasChanged = false)
Parameters
Type Name Description
SerializedProperty property
System.Boolean forceHasChanged

CheckForModifiedProperty<T>(SerializedProperty, T, Boolean)

Declaration
public static void CheckForModifiedProperty<T>(SerializedProperty property, T targetObject, bool forceHasChanged = false)
Parameters
Type Name Description
SerializedProperty property
T targetObject
System.Boolean forceHasChanged
Type Parameters
Name Description
T

DidModifyProperty(SerializedProperty)

Declaration
public static bool DidModifyProperty(SerializedProperty property)
Parameters
Type Name Description
SerializedProperty property
Returns
Type Description
System.Boolean

DidModifyProperty<T>(SerializedProperty, T)

Declaration
public static bool DidModifyProperty<T>(SerializedProperty property, T targetObject)
Parameters
Type Name Description
SerializedProperty property
T targetObject
Returns
Type Description
System.Boolean
Type Parameters
Name Description
T

GetChildPropertyCount(SerializedProperty, Boolean)

Declaration
public static int GetChildPropertyCount(SerializedProperty property, bool includeGrandChildren = false)
Parameters
Type Name Description
SerializedProperty property
System.Boolean includeGrandChildren
Returns
Type Description
System.Int32

GetChildren(SerializedProperty)

Declaration
public static IEnumerable<SerializedProperty> GetChildren(this SerializedProperty property)
Parameters
Type Name Description
SerializedProperty property
Returns
Type Description
System.Collections.Generic.IEnumerable<SerializedProperty>

GetMapboxDataPropertyObject<T>(T)

Declaration
public static MapboxDataProperty GetMapboxDataPropertyObject<T>(T targetObject)
Parameters
Type Name Description
T targetObject
Returns
Type Description
MapboxDataProperty
Type Parameters
Name Description
T

GetTargetObjectOfProperty(SerializedProperty)

Gets the object the property represents.

Declaration
public static object GetTargetObjectOfProperty(SerializedProperty prop)
Parameters
Type Name Description
SerializedProperty prop
Returns
Type Description
System.Object

GetTargetObjectWithProperty(SerializedProperty)

Gets the object that the property is a member of

Declaration
public static object GetTargetObjectWithProperty(SerializedProperty prop)
Parameters
Type Name Description
SerializedProperty prop
Returns
Type Description
System.Object

GetTargetType(SerializedObject)

Declaration
public static Type GetTargetType(this SerializedObject obj)
Parameters
Type Name Description
SerializedObject obj
Returns
Type Description
System.Type

SetTargetObjectOfProperty(SerializedProperty, Object)

Declaration
public static void SetTargetObjectOfProperty(SerializedProperty prop, object value)
Parameters
Type Name Description
SerializedProperty prop
System.Object value
Back to top © 2017 Mapbox