SkillTreeUtility

Convenience class.

Methods

GenerateRandomGUID

Return Type: string

Generates a random GUID string.

Parameters

NameDescriptionType

maxTokenLength

The max length. Default: 24 (cannot be longer than 24).

int

StringtoSkillTypeIndex

Return Type: int

Converts a string to a skill type index if possible. 0 will be returned if the string didn't match a skill type.

Parameters

NameDescriptionType

s

The string to convert.

string

GetDefaultStatIdentity

Return Type: StatIdentity

Gets the default stat identity.

SetPadding

Sets rect transform padding.

Parameters

NameDescriptionType

rt

The RectTransform.

RectTransform

padding

The padding.

RectPadding

SetLeft

Sets the left value of a RectTransform.

Parameters

NameDescriptionType

rt

The RectTransform.

RectTransform

left

The left amount.

float

SetRight

Sets the right value of a RectTransform.

Parameters

NameDescriptionType

rt

The RectTransform.

RectTransform

right

The right amount.

float

SetTop

Sets the top value of a RectTransform.

Parameters

NameDescriptionType

rt

The RectTransform.

RectTransform

top

The top amount.

float

SetBottom

Sets the left value of a RectTransform.

Parameters

NameDescriptionType

rt

The RectTransform.

RectTransform

bottom

The bottom amount.

float

ForceInsideView

Forces a RectTransform inside of the camera's view.

Parameters

NameDescriptionType

rectTransform

A RectTransform.

RectTransform

CountCornersVisibleFrom

Return Type: int

Counts the bounding box corners of the given RectTransform that are visible in screen space.

Parameters

NameDescriptionType

rectTransform

The RectTransform.

RectTransform

camera

The camera. Leave it null for overlay canvasses.

Camera

IsFullyVisible

Return Type: bool

Determines if this RectTransform is fully visible. Works by checking if each bounding box corner of this RectTransform is inside the screen space view frustrum.

Parameters

NameDescriptionType

rectTransform

The RectTransform.

RectTransform

camera

The camera. Leave it null for overlay canvasses.

Camera

IsPartiallyVisible

Return Type: bool

Determines if this RectTransform is at least partially visible. Works by checking if any bounding box corner of this RectTransform is inside the screen space view frustrum.

Parameters

NameDescriptionType

rectTransform

The RectTransform.

RectTransform

camera

The camera. Leave it null for overlay canvasses.

Camera

CountCornersInsideOf

Return Type: int

Counts the number of corners a RectTransform has inside of another RectTransform.

Parameters

NameDescriptionType

rectTransform

The RectTransform.

RectTransform

other

The other RectTransform.

RectTransform

endAsap

If it should stop counting corners after the first corner found inside of the other RectTransform.

bool

IsFullyInside

Return Type: bool

If the RectTransform is fully inside another.

Parameters

NameDescriptionType

rectTransform

The RectTransform.

RectTransform

other

The other RectTransform.

RectTransform

IsPartiallyInside

Return Type: bool

If the RectTransform is partially inside another.

Parameters

NameDescriptionType

rectTransform

The RectTransform.

RectTransform

other

The other RectTransform.

RectTransform

IsFullyOutside

Return Type: bool

If the RectTransform is fully outside another.

Parameters

NameDescriptionType

rectTransform

The RectTransform.

RectTransform

other

The other RectTransform.

RectTransform

IsPartiallyOutside

Return Type: bool

If the RectTransform is partially outside another.

Parameters

NameDescriptionType

rectTransform

The RectTransform.

RectTransform

other

The other RectTransform.

RectTransform

Last updated