Various extensions.
More...
|
static string | RGBToHex (this Color color) |
| A Color extension method that converts a Unity Color to a hexadecimal string. More...
|
|
static Color | HexToRGB (this Color color, string hex) |
| A Color extension method that converts a hexadecimal string to a Unity Color. More...
|
|
static RaycastHit[] | Sort (this RaycastHit[] hits) |
| A RaycastHit[] extension method that sorts the given array according to distance from closest to furthest. More...
|
|
static bool | HasLayer (this LayerMask mask, int layer) |
| A LayerMask extension method that query if 'mask' has layer. More...
|
|
static int | GetFirstSetLayer (this LayerMask mask) |
| A LayerMask extension method that gets the first layer that is present in the mask. More...
|
|
static LayerMask | IncludeLayer (this LayerMask mask, int layer) |
| A LayerMask extension method that includes a layer in the mask. More...
|
|
static LayerMask | RemoveLayer (this LayerMask mask, int layer) |
| A LayerMask extension method that removes a layer from the mask. More...
|
|
static LayerMask | ToggleLayer (this LayerMask mask, int layer) |
| A LayerMask extension method that toggle a layer in the mask. More...
|
|
static Transform | GetFirstChildWithTag (this Transform parent, string tag) |
|
static int plyCommon.plyExtensions.GetFirstSetLayer |
( |
this LayerMask |
mask | ) |
|
|
static |
A LayerMask extension method that gets the first layer that is present in the mask.
- Parameters
-
- Returns
- The first found layer.
static bool plyCommon.plyExtensions.HasLayer |
( |
this LayerMask |
mask, |
|
|
int |
layer |
|
) |
| |
|
static |
A LayerMask extension method that query if 'mask' has layer.
- Parameters
-
mask | The mask to act on. |
layer | The layer to check. |
- Returns
- true if layer is in the mask, false if not.
static Color plyCommon.plyExtensions.HexToRGB |
( |
this Color |
color, |
|
|
string |
hex |
|
) |
| |
|
static |
A Color extension method that converts a hexadecimal string to a Unity Color.
- Parameters
-
color | The color to act on. |
hex | The hexadecimal colour value. |
- Returns
- A Color.
static LayerMask plyCommon.plyExtensions.IncludeLayer |
( |
this LayerMask |
mask, |
|
|
int |
layer |
|
) |
| |
|
static |
A LayerMask extension method that includes a layer in the mask.
- Parameters
-
mask | The mask to act on. |
layer | The layer to add. |
- Returns
- The modified LayerMask.
static LayerMask plyCommon.plyExtensions.RemoveLayer |
( |
this LayerMask |
mask, |
|
|
int |
layer |
|
) |
| |
|
static |
A LayerMask extension method that removes a layer from the mask.
- Parameters
-
mask | The mask to act on. |
layer | The layer to remove. |
- Returns
- The modified LayerMask.
static string plyCommon.plyExtensions.RGBToHex |
( |
this Color |
color | ) |
|
|
static |
A Color extension method that converts a Unity Color to a hexadecimal string.
- Parameters
-
color | The color to act on. |
- Returns
- A string representation of the hexadecimal value.
static RaycastHit [] plyCommon.plyExtensions.Sort |
( |
this RaycastHit[] |
hits | ) |
|
|
static |
A RaycastHit[] extension method that sorts the given array according to distance from closest to furthest.
- Parameters
-
hits | The hits list act on. |
static LayerMask plyCommon.plyExtensions.ToggleLayer |
( |
this LayerMask |
mask, |
|
|
int |
layer |
|
) |
| |
|
static |
A LayerMask extension method that toggle a layer in the mask.
- Parameters
-
mask | The mask to act on. |
layer | The layer to toggle. |
- Returns
- The modified LayerMask.