Property | Type | Description | |
---|---|---|---|
bottomAnchor | AnchorPoint, | ||
leftAnchor | AnchorPoint, | ||
rightAnchor | AnchorPoint, | ||
topAnchor | AnchorPoint, | ||
updateAnchors | AnchorUpdate |
Property | Type | Description | |
---|---|---|---|
mChanged | bool | ||
mChildren | BetterList |
||
mGo | GameObject | ||
mParentFound | bool | ||
mStarted | bool | ||
mTrans | Transform | ||
mUpdateAnchors | bool |
Method | Description | |
---|---|---|
CalculateFinalAlpha ( int frameID ) : float |
Get the final cumulative alpha.
|
|
FindCameraFor ( AnchorPoint, ap ) : void |
Helper function -- attempt to find the camera responsible for the specified anchor.
|
|
GetSides ( Transform relativeTo ) : Vector3[] |
Get the sides of the rectangle relative to the specified transform. The order is left, top, right, bottom.
|
|
Invalidate ( bool includeChildren ) : void |
Sets the local 'changed' flag, indicating that some parent value(s) are now be different, such as alpha for example.
|
|
ParentHasChanged ( ) : void |
Call this function when the rectangle's parent has changed.
|
|
ResetAnchors ( ) : void |
Ensure that all rect references are set correctly on the anchors.
|
|
ResetAndUpdateAnchors ( ) : void |
Convenience method that resets and updates the anchors, all at once.
|
|
SetAnchor ( GameObject go ) : void |
Anchor this rectangle to the specified transform. Note that this function will not keep the rectangle's current dimensions, but will instead assume the target's dimensions.
|
|
SetAnchor ( GameObject go, int left, int bottom, int right, int top ) : void |
Anchor this rectangle to the specified transform.
|
|
SetAnchor ( Transform t ) : void |
Anchor this rectangle to the specified transform. Note that this function will not keep the rectangle's current dimensions, but will instead assume the target's dimensions.
|
|
SetRect ( float x, float y, float width, float height ) : void |
Set the rectangle manually.
|
|
Update ( ) : void |
Rectangles need to update in a specific order -- parents before children. When deriving from this class, override its OnUpdate() function instead.
|
|
UpdateAnchors ( ) : void |
Manually update anchored sides.
|
Method | Description | |
---|---|---|
GetLocalPos ( AnchorPoint, ac, Transform trans ) : Vector3 |
Helper function that gets the specified anchor's position relative to the chosen transform.
|
|
OnAnchor ( ) : void |
Update the dimensions of the rectangle using anchor points.
|
|
OnDisable ( ) : void |
Clear the parent rectangle reference.
|
|
OnEnable ( ) : void |
Automatically find the parent rectangle.
|
|
OnInit ( ) : void |
Automatically find the parent rectangle.
|
|
OnStart ( ) : void |
Abstract start functionality, ensured to happen after the anchor rect references have been set.
|
|
OnUpdate ( ) : void |
Abstract update functionality, ensured to happen after the targeting anchors have been updated.
|
|
OnValidate ( ) : void |
This callback is sent inside the editor notifying us that some property has changed.
|
|
Start ( ) : void |
Set anchor rect references on start.
|
public abstract CalculateFinalAlpha ( int frameID ) : float | ||
frameID | int | |
return | float |
public FindCameraFor ( AnchorPoint, ap ) : void | ||
ap | AnchorPoint, | |
return | void |
protected GetLocalPos ( AnchorPoint, ac, Transform trans ) : Vector3 | ||
ac | AnchorPoint, | |
trans | Transform | |
return | Vector3 |
public GetSides ( Transform relativeTo ) : Vector3[] | ||
relativeTo | Transform | |
return | Vector3[] |
public Invalidate ( bool includeChildren ) : void | ||
includeChildren | bool | |
return | void |
public SetAnchor ( GameObject go, int left, int bottom, int right, int top ) : void | ||
go | GameObject | |
left | int | |
bottom | int | |
right | int | |
top | int | |
return | void |
public abstract SetRect ( float x, float y, float width, float height ) : void | ||
x | float | |
y | float | |
width | float | |
height | float | |
return | void |