ExposedMember Class Reference

Contains information about an exposed property, such as the name, type, tool-tip, and reflection information.
Has methods to get and set the value of the property by invoking the get and set methods of the exposed-accessor, invoking the exposed function, or if an exposed field, accessing it directly. Stores information about the attributes applied, in code, to the exposed member, which specify how, where and when it should be displayed.

Public Member Functions

 ExposedMember (System.Object instance, MemberInfo info, ExposeMemberAttribute attributeInfo=null, string prependIDString=null)
 Constructor for this class. Takes an object instance, and a MemberInfo that reference a single member of this object.
Also a type field is provided, which specifies how the field will be drawn, and what kind of data it contains.
 
bool AlternateLabelConditional ()
 Used to determine if the normal label, or the alternateLabel should be used when displaying this control.
 
bool ConditionalDisplay ()
 Determines if the control should be displayed, based upon group foldout and the conditional states, if used.
 
Vector2 FloatRangeAttributeMinMax ()
 Returns the intergerRange attribute on this object. Only valid if hasRangeAttribute is true. Only applicable if the field systemType is integer.
 
virtual System.Object GetValue ()
 Used to retrieve the current value of the exposed property, contained in the object referenced by m_Instance.
 
bool GroupFoldoutState ()
 If the group that this ExposedProperty is a member of, has a foldout/fold-up option, this function will return the current state of that foldout.
 
bool hasMultiLineAttribute ()
 Checks all the attributes assigned to determine if any are the MultilineAttribute or ExposeMultiLineAttribute, and returns true if so.
 
bool hasRangeAttribute ()
 Checks to see if the RangeAttribute is one of those applied to this ExposedProperty
 
virtual UniqueStringID IDstring ()
 Returns a uniquieStringID value based on this exposed member's instance's name and this exposed member's name
 
Vector2Int IntRangeAttributeMinMax ()
 Returns the intergerRange attribute on this object. Only valid if hasRangeAttribute is true. Only applicable if the field systemType is integer.
 
bool NoGroupingConditionalDisplay ()
 Determines if the control should be displayed, based upon it's conditional state, if used, but ignores the group-foldout state.
 
void SetGroupFoldoutState (bool value)
 If the group that this ExposedProperty is a member of, has a foldout/fold-up option, this function will set the current state of that foldout.
 
virtual void SetValue (System.Object value)
 Used to assign a value to the exposed property, contained in the object referenced by m_Instance.
 
override string ToString ()
 Returns the path of the exposedMember.
 

Public Attributes

GUIContent alternateLabel
 The alternate label that may ,conditionally, be displayed.
 
int displayOrderInGroup
 displayOrderInGroup is not used by this class, but is used by the ExposedObjectMembers when displaying all exposed properties. All properties, with NO group specified will be considered in the same group as far as this member is concerned.

 
bool displayWarningWhenNull
 This option is appropriate only for reference types, not structs or value-types. Setting this option to true makes the member exposer display a warning in the inspector, when no reference has been provided for the exposed member (is null)
 
string group
 group fields are not actually used by this class, only initialized by it. They are used by the ExposedObjectPropertie,s and potentially user classes and functions, when displaying all exposed properties at once.
 
string groupEnabledControl
 This attribute may only be applied to boolean exposedMembers. These exposed members will be drawn on the same line a group header or foldout, and will enable or disable the entire group for display.
 
bool isAnAccessor
 When true the exposed property is an accessor, when false, exposed property is a variable/field.
 
bool isExpanded
 specifies weather or not the exposed property can be expanded to show details.
 
bool isPotentialWarning
 This option is only used when exposing booleans types. When this flag is used, rather than displaying a check box when exposing the boolean, it will display a warning, when the member's value is true, and nothing when the value is false. The Label of the exposed member is displayed as the warning's text.
 
GUIContent label
 The label that will be drawn with the control.
 
Action offerCreationFunctionWhenNull
 This option is appropriate only for reference types, not structs or value-types. When specified, a button will be presented when this members reference value is null. The function named in this parameter will be invoked when the button is clicked.
 
string prependIDString
 Stores a string that will be prepended to the normal results of ToString(), before that function returns. Default value is: ""
 
bool readOnly
 read-only flag is automatically set to true if the exposed property is an accessor that does not have a set function. or if the readOnly ExposedMemberAttribute parameter is set to true.
 

Protected Member Functions

string ExposedMemberToString ()
 Non overridable variant of ToString, used during construction for logging.
 

Protected Attributes

UniqueStringID uniqueID
 This member uniquely Identifies the string, using only a few bytes. It is used as the key in saved/loaded foldout state dictionaries. It's value is computed based on the ToString Member, the first time the IDString function is invoked: the computed result is cashed in this member.
 

Properties

bool GroupIsFoldout [get]
 Determines weather the group that this ExposedProperty is a member of, has a foldout/fold-up option.
 
virtual MemberInfo Info [get]
 Read-only reference to the MemberInfo that describes the ExposedMember.
 
virtual object Instance [get]
 read-only reference to the Object that contains this exposed property.
 
virtual string Name [get]
 Provides a nicified label-quality name for the ExposedProperty, that is based on the identifier used, in code, for the accessor.
 
virtual Type systemType [get]
 Specifies the actual system type of the exposed property.
 
+ Inheritance diagram for ExposedMember:
+ Collaboration diagram for ExposedMember: