SkillTreeUtility
Convenience class.
Methods
GenerateRandomGUID
Return Type: string
Generates a random GUID string.
Parameters
Name | Description | Type |
---|---|---|
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
Name | Description | Type |
---|---|---|
s | The string to convert. | string |
GetDefaultStatIdentity
Return Type: StatIdentity
Gets the default stat identity.
SetPadding
Sets rect transform padding.
Parameters
Name | Description | Type |
---|---|---|
rt | The RectTransform. | RectTransform |
padding | The padding. | RectPadding |
SetLeft
Sets the left value of a RectTransform.
Parameters
Name | Description | Type |
---|---|---|
rt | The RectTransform. | RectTransform |
left | The left amount. | float |
SetRight
Sets the right value of a RectTransform.
Parameters
Name | Description | Type |
---|---|---|
rt | The RectTransform. | RectTransform |
right | The right amount. | float |
SetTop
Sets the top value of a RectTransform.
Parameters
Name | Description | Type |
---|---|---|
rt | The RectTransform. | RectTransform |
top | The top amount. | float |
SetBottom
Sets the left value of a RectTransform.
Parameters
Name | Description | Type |
---|---|---|
rt | The RectTransform. | RectTransform |
bottom | The bottom amount. | float |
ForceInsideView
Forces a RectTransform inside of the camera's view.
Parameters
Name | Description | Type |
---|---|---|
rectTransform | A RectTransform. | RectTransform |
CountCornersVisibleFrom
Return Type: int
Counts the bounding box corners of the given RectTransform that are visible in screen space.
Parameters
Name | Description | Type |
---|---|---|
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
Name | Description | Type |
---|---|---|
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
Name | Description | Type |
---|---|---|
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
Name | Description | Type |
---|---|---|
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
Name | Description | Type |
---|---|---|
rectTransform | The RectTransform. | RectTransform |
other | The other RectTransform. | RectTransform |
IsPartiallyInside
Return Type: bool
If the RectTransform is partially inside another.
Parameters
Name | Description | Type |
---|---|---|
rectTransform | The RectTransform. | RectTransform |
other | The other RectTransform. | RectTransform |
IsFullyOutside
Return Type: bool
If the RectTransform is fully outside another.
Parameters
Name | Description | Type |
---|---|---|
rectTransform | The RectTransform. | RectTransform |
other | The other RectTransform. | RectTransform |
IsPartiallyOutside
Return Type: bool
If the RectTransform is partially outside another.
Parameters
Name | Description | Type |
---|---|---|
rectTransform | The RectTransform. | RectTransform |
other | The other RectTransform. | RectTransform |
Last updated