Class BoundExtensions
A set of helper functions and extensions methods for Unity's Bounds structs of different types. Bounds and BoundsInt.
Inheritance
System.Object
BoundExtensions
Namespace: SF
Assembly: cs.temp.dll.dll
Syntax
public static class BoundExtensions
Methods
BottomCenter(Bounds)
Declaration
public static Vector2 BottomCenter(this Bounds bounds)
Parameters
| Type |
Name |
Description |
| Bounds |
bounds |
|
Returns
BottomCenter(BoundsInt)
Declaration
public static Vector2 BottomCenter(this BoundsInt bounds)
Parameters
| Type |
Name |
Description |
| BoundsInt |
bounds |
|
Returns
BottomLeft(Bounds)
Declaration
public static Vector2 BottomLeft(this Bounds bounds)
Parameters
| Type |
Name |
Description |
| Bounds |
bounds |
|
Returns
BottomLeft(BoundsInt)
Declaration
public static Vector2 BottomLeft(this BoundsInt bounds)
Parameters
| Type |
Name |
Description |
| BoundsInt |
bounds |
|
Returns
BottomRight(Bounds)
Declaration
public static Vector2 BottomRight(this Bounds bounds)
Parameters
| Type |
Name |
Description |
| Bounds |
bounds |
|
Returns
BottomRight(BoundsInt)
Declaration
public static Vector2 BottomRight(this BoundsInt bounds)
Parameters
| Type |
Name |
Description |
| BoundsInt |
bounds |
|
Returns
Deconstruct(Vector3Int, out Int32, out Int32, out Int32)
A decontructor that allows users to out the three values of a Vector3Int into three seperate int values.
Declaration
public static void Deconstruct(this Vector3Int vector3Int, out int x, out int y, out int z)
Parameters
| Type |
Name |
Description |
| Vector3Int |
vector3Int |
|
| System.Int32 |
x |
|
| System.Int32 |
y |
|
| System.Int32 |
z |
|
GetBoundsMinInt(Bounds)
Gets the min of a Bounds than converts the values to a intgear from a floating point to be put into a returned Vector3Int.
This is heavily used in things using Rect, Sprite Borders, and TileMaps with the grid functions.
Declaration
public static Vector3Int GetBoundsMinInt(this Bounds bounds)
Parameters
| Type |
Name |
Description |
| Bounds |
bounds |
|
Returns
| Type |
Description |
| Vector3Int |
|
GetBoundsSizeInt(Bounds)
Gets the size of a normal Bounds while converting the sizes to be integears. Than returns a Vector3Int with the converted size values.
Declaration
public static Vector3Int GetBoundsSizeInt(this Bounds bounds)
Parameters
| Type |
Name |
Description |
| Bounds |
bounds |
|
Returns
| Type |
Description |
| Vector3Int |
|
MiddleCenter(Bounds)
Declaration
public static Vector2 MiddleCenter(this Bounds bounds)
Parameters
| Type |
Name |
Description |
| Bounds |
bounds |
|
Returns
MiddleCenter(BoundsInt)
Declaration
public static Vector2 MiddleCenter(this BoundsInt bounds)
Parameters
| Type |
Name |
Description |
| BoundsInt |
bounds |
|
Returns
MiddleLeft(Bounds)
Declaration
public static Vector2 MiddleLeft(this Bounds bounds)
Parameters
| Type |
Name |
Description |
| Bounds |
bounds |
|
Returns
MiddleLeft(BoundsInt)
Declaration
public static Vector2 MiddleLeft(this BoundsInt bounds)
Parameters
| Type |
Name |
Description |
| BoundsInt |
bounds |
|
Returns
MiddleRight(Bounds)
Declaration
public static Vector2 MiddleRight(this Bounds bounds)
Parameters
| Type |
Name |
Description |
| Bounds |
bounds |
|
Returns
MiddleRight(BoundsInt)
Declaration
public static Vector2 MiddleRight(this BoundsInt bounds)
Parameters
| Type |
Name |
Description |
| BoundsInt |
bounds |
|
Returns
ToBounds(BoundsInt)
Converts a BoundInt to just a normal Bounds.
Declaration
public static Bounds ToBounds(this BoundsInt boundsInt)
Parameters
| Type |
Name |
Description |
| BoundsInt |
boundsInt |
|
Returns
ToBoundsInt(Bounds)
Converts a Bounds to a BoundsInt
Declaration
public static BoundsInt ToBoundsInt(this Bounds bounds)
Parameters
| Type |
Name |
Description |
| Bounds |
bounds |
|
Returns
| Type |
Description |
| BoundsInt |
|
TopCenter(Bounds)
Declaration
public static Vector2 TopCenter(this Bounds bounds)
Parameters
| Type |
Name |
Description |
| Bounds |
bounds |
|
Returns
TopCenter(BoundsInt)
Declaration
public static Vector2 TopCenter(this BoundsInt bounds)
Parameters
| Type |
Name |
Description |
| BoundsInt |
bounds |
|
Returns
TopLeft(Bounds)
Declaration
public static Vector2 TopLeft(this Bounds bounds)
Parameters
| Type |
Name |
Description |
| Bounds |
bounds |
|
Returns
TopLeft(BoundsInt)
Declaration
public static Vector2 TopLeft(this BoundsInt bounds)
Parameters
| Type |
Name |
Description |
| BoundsInt |
bounds |
|
Returns
TopRight(Bounds)
Declaration
public static Vector2 TopRight(this Bounds bounds)
Parameters
| Type |
Name |
Description |
| Bounds |
bounds |
|
Returns
TopRight(BoundsInt)
Declaration
public static Vector2 TopRight(this BoundsInt bounds)
Parameters
| Type |
Name |
Description |
| BoundsInt |
bounds |
|
Returns