C# Class Ludiq.Reflection.Editor.UnityMemberDrawer

Inheritance: TargetedDrawer
显示文件 Open project: lazlo-bonin/unity-reflection

Protected Properties

Property Type Description
componentProperty UnityEditor.SerializedProperty
filter FilterAttribute
nameProperty UnityEditor.SerializedProperty
parameterTypesProperty UnityEditor.SerializedProperty
property UnityEditor.SerializedProperty
targetType UnityObjectType
targets UnityObject[]

Public Methods

Method Description
HasSharedGameObject ( ) : bool

Determines if the targets all share a GameObject.

Protected Methods

Method Description
DetermineTargetType ( ) : UnityObjectType

Determine the Unity type of the targets.

FindTargets ( ) : UnityObject[]

Get the list of targets on the inspected objects.

GetMemberOption ( MemberInfo member, string component, bool inherited ) : DropdownOption
GetSharedComponentTypes ( ) : IEnumerable

Determines which types of Components are shared on all GameObject targets.

GetSharedScriptableObjectType ( ) : Type

Determines which type of ScriptableObject is shared across targets. Returns null if none are shared.

GetTypeMemberOptions ( Type type, string component = null ) : List>

Gets the list of members available on a type as popup options.

GetValue ( ) : UnityMember

Returns a member constructed from the current parameter values.

RenderMemberControl ( Rect position ) : void
SetValue ( UnityMember value ) : void

Assigns the property values from a specified member.

Update ( UnityEditor.SerializedProperty property ) : void
ValidateMember ( MemberInfo member ) : bool

Determines whether a given MemberInfo should be included in the options. This check follows the BindingFlags and MemberTypes filtering.

ValidateMemberType ( Type type ) : bool

Determines whether a MemberInfo of the given type should be included in the options.

Private Methods

Method Description
GetAllMemberOptions ( ) : List>

Method Details

DetermineTargetType() protected method

Determine the Unity type of the targets.
protected DetermineTargetType ( ) : UnityObjectType
return UnityObjectType

FindTargets() protected method

Get the list of targets on the inspected objects.
protected FindTargets ( ) : UnityObject[]
return UnityObject[]

GetMemberOption() protected method

protected GetMemberOption ( MemberInfo member, string component, bool inherited ) : DropdownOption
member System.Reflection.MemberInfo
component string
inherited bool
return DropdownOption

GetSharedComponentTypes() protected method

Determines which types of Components are shared on all GameObject targets.
protected GetSharedComponentTypes ( ) : IEnumerable
return IEnumerable

GetSharedScriptableObjectType() protected method

Determines which type of ScriptableObject is shared across targets. Returns null if none are shared.
protected GetSharedScriptableObjectType ( ) : Type
return System.Type

GetTypeMemberOptions() protected method

Gets the list of members available on a type as popup options.
protected GetTypeMemberOptions ( Type type, string component = null ) : List>
type System.Type
component string
return List>

GetValue() protected method

Returns a member constructed from the current parameter values.
protected GetValue ( ) : UnityMember
return UnityMember

HasSharedGameObject() public method

Determines if the targets all share a GameObject.
public HasSharedGameObject ( ) : bool
return bool

RenderMemberControl() protected method

protected RenderMemberControl ( Rect position ) : void
position UnityEngine.Rect
return void

SetValue() protected method

Assigns the property values from a specified member.
protected SetValue ( UnityMember value ) : void
value UnityMember
return void

Update() protected method

protected Update ( UnityEditor.SerializedProperty property ) : void
property UnityEditor.SerializedProperty
return void

ValidateMember() protected method

Determines whether a given MemberInfo should be included in the options. This check follows the BindingFlags and MemberTypes filtering.
protected ValidateMember ( MemberInfo member ) : bool
member System.Reflection.MemberInfo
return bool

ValidateMemberType() protected method

Determines whether a MemberInfo of the given type should be included in the options.
protected ValidateMemberType ( Type type ) : bool
type System.Type
return bool

Property Details

componentProperty protected_oe property

The UnityMember.component of the inspected property, of type string.
protected SerializedProperty,UnityEditor componentProperty
return UnityEditor.SerializedProperty

filter protected_oe property

The filter attribute on the inspected field.
protected FilterAttribute filter
return FilterAttribute

nameProperty protected_oe property

The UnityMember.name of the inspected property, of type string.
protected SerializedProperty,UnityEditor nameProperty
return UnityEditor.SerializedProperty

parameterTypesProperty protected_oe property

The UnityMethod.parameterTypes of the inspected property, of type Type[].
protected SerializedProperty,UnityEditor parameterTypesProperty
return UnityEditor.SerializedProperty

property protected_oe property

The inspected property, of type UnityMember.
protected SerializedProperty,UnityEditor property
return UnityEditor.SerializedProperty

targetType protected_oe property

The type of targeted objects.
protected UnityObjectType targetType
return UnityObjectType

targets protected_oe property

The targeted Unity Objects.
protected UnityObject[] targets
return UnityObject[]