C# Class UIRectEditor, TheUnseen

Inheritance: Editor
Afficher le fichier Open project: henryj41043/TheUnseen Class Usage Examples

Protected Properties

Свойство Type Description
FieldName string[]
HorizontalList string[]
IsHorizontal bool[]
PrefixName string[]
VerticalList string[]
mAnchorType AnchorType
mCustom bool[]
mTarget Transform[]

Méthodes publiques

Méthode Description
OnInspectorGUI ( ) : void

Draw the inspector properties.

UpdateHorizontalAnchor ( UIRect, r, UIRect, anchor, bool resetRelative ) : void

Convenience function that switches the anchor mode and ensures that dimensions are kept intact.

UpdateVerticalAnchor ( UIRect, r, UIRect, anchor, bool resetRelative ) : void

Convenience function that switches the anchor mode and ensures that dimensions are kept intact.

Méthodes protégées

Méthode Description
DrawAnchor ( int index, bool targetSelection ) : void

Helper function that draws the suffix after the relative fields.

DrawCustomProperties ( ) : void
DrawFinalProperties ( ) : void

Draw the "Anchors" property block.

DrawSingleAnchorSelection ( ) : UnityEditor.SerializedProperty

Draw a selection for a single target (one target sets all 4 sides)

GetCamera ( UnityEditor.SerializedProperty sp ) : Camera

Pass something like leftAnchor.target to get its rectangle reference.

GetRect ( UnityEditor.SerializedProperty sp ) : UIRect,

Pass something like leftAnchor.target to get its rectangle reference.

IsCommon ( float relative ) : bool

Whether the specified relative offset is a common value (0, 0.5, or 1)

IsRect ( UnityEditor.SerializedProperty sp ) : bool

Returns 'true' if the specified serialized property reference is a UIRect.

OnDrawFinalProperties ( ) : void
OnEnable ( ) : void

Determine the initial anchor type.

ReEvaluateAnchorType ( ) : void

Manually re-evaluate the current anchor type.

ShouldDrawProperties ( ) : bool
UpdateAnchor ( int index, bool resetRelative ) : void

Convenience function that switches the anchor mode and ensures that dimensions are kept intact.

UpdateAnchors ( bool resetRelative ) : void

Convenience function that switches the anchor mode and ensures that dimensions are kept intact.

Method Details

DrawAnchor() protected méthode

Helper function that draws the suffix after the relative fields.
protected DrawAnchor ( int index, bool targetSelection ) : void
index int
targetSelection bool
Résultat void

DrawCustomProperties() protected méthode

protected DrawCustomProperties ( ) : void
Résultat void

DrawFinalProperties() protected méthode

Draw the "Anchors" property block.
protected DrawFinalProperties ( ) : void
Résultat void

DrawSingleAnchorSelection() protected méthode

Draw a selection for a single target (one target sets all 4 sides)
protected DrawSingleAnchorSelection ( ) : UnityEditor.SerializedProperty
Résultat UnityEditor.SerializedProperty

GetCamera() static protected méthode

Pass something like leftAnchor.target to get its rectangle reference.
static protected GetCamera ( UnityEditor.SerializedProperty sp ) : Camera
sp UnityEditor.SerializedProperty
Résultat Camera

GetRect() static protected méthode

Pass something like leftAnchor.target to get its rectangle reference.
static protected GetRect ( UnityEditor.SerializedProperty sp ) : UIRect,
sp UnityEditor.SerializedProperty
Résultat UIRect,

IsCommon() static protected méthode

Whether the specified relative offset is a common value (0, 0.5, or 1)
static protected IsCommon ( float relative ) : bool
relative float
Résultat bool

IsRect() static protected méthode

Returns 'true' if the specified serialized property reference is a UIRect.
static protected IsRect ( UnityEditor.SerializedProperty sp ) : bool
sp UnityEditor.SerializedProperty
Résultat bool

OnDrawFinalProperties() protected méthode

protected OnDrawFinalProperties ( ) : void
Résultat void

OnEnable() protected méthode

Determine the initial anchor type.
protected OnEnable ( ) : void
Résultat void

OnInspectorGUI() public méthode

Draw the inspector properties.
public OnInspectorGUI ( ) : void
Résultat void

ReEvaluateAnchorType() protected méthode

Manually re-evaluate the current anchor type.
protected ReEvaluateAnchorType ( ) : void
Résultat void

ShouldDrawProperties() protected méthode

protected ShouldDrawProperties ( ) : bool
Résultat bool

UpdateAnchor() protected méthode

Convenience function that switches the anchor mode and ensures that dimensions are kept intact.
protected UpdateAnchor ( int index, bool resetRelative ) : void
index int
resetRelative bool
Résultat void

UpdateAnchors() protected méthode

Convenience function that switches the anchor mode and ensures that dimensions are kept intact.
protected UpdateAnchors ( bool resetRelative ) : void
resetRelative bool
Résultat void

UpdateHorizontalAnchor() static public méthode

Convenience function that switches the anchor mode and ensures that dimensions are kept intact.
static public UpdateHorizontalAnchor ( UIRect, r, UIRect, anchor, bool resetRelative ) : void
r UIRect,
anchor UIRect,
resetRelative bool
Résultat void

UpdateVerticalAnchor() static public méthode

Convenience function that switches the anchor mode and ensures that dimensions are kept intact.
static public UpdateVerticalAnchor ( UIRect, r, UIRect, anchor, bool resetRelative ) : void
r UIRect,
anchor UIRect,
resetRelative bool
Résultat void

Property Details

FieldName static_oe protected_oe property

static protected string[] FieldName
Résultat string[]

HorizontalList static_oe protected_oe property

static protected string[] HorizontalList
Résultat string[]

IsHorizontal static_oe protected_oe property

static protected bool[] IsHorizontal
Résultat bool[]

PrefixName static_oe protected_oe property

static protected string[] PrefixName
Résultat string[]

VerticalList static_oe protected_oe property

static protected string[] VerticalList
Résultat string[]

mAnchorType protected_oe property

protected AnchorType mAnchorType
Résultat AnchorType

mCustom protected_oe property

protected bool[] mCustom
Résultat bool[]

mTarget protected_oe property

protected Transform[] mTarget
Résultat Transform[]