UnityEssentials
Small but useful tools and features for Unity
Static Public Member Functions | List of all members
UnityEngine.VectorIntExtensions Class Reference

Extensions for VectorInt More...

Collaboration diagram for UnityEngine.VectorIntExtensions:
Collaboration graph

Static Public Member Functions

static Vector2Int Clone (this Vector2Int v)
 Creates a new vector with the same values as the original. More...
 
static Vector2Int WithX (this Vector2Int v, int x=0)
 Creates a new vector with the same value for the 'y' parameter but a new one for the 'x'. More...
 
static Vector2Int WithY (this Vector2Int v, int y=0)
 Creates a new vector with the same value for the 'x' parameter but a new one for the 'y'. More...
 
static Vector3Int ToVector3IntNewX (this Vector2Int v, int x=0)
 Creates a new Vector3Int keeping the values from the 'x' and 'y' parameters of the original Vector2Int in that order. More...
 
static Vector3Int ToVector3IntNewY (this Vector2Int v, int y=0)
 Creates a new Vector3Int keeping the values from the 'x' and 'y' parameters of the original Vector2Int in that order. More...
 
static Vector3Int ToVector3IntNewZ (this Vector2Int v, int z=0)
 Creates a new Vector3Int keeping the values from the 'x' and 'y' parameters of the original Vector2Int in that order. More...
 
static Vector3Int Clone (this Vector3Int v)
 Creates a new vector with the same values as the original. More...
 
static Vector2Int ToVector2IntWithoutX (this Vector3Int v)
 Creates a new Vector2Int keeping the values from the 'y' and 'z' parameters of the original Vector3Int. More...
 
static Vector2Int ToVector2IntWithoutY (this Vector3Int v)
 Creates a new Vector2Int keeping the values from the 'x' and 'z' parameters of the original Vector3Int. More...
 
static Vector2Int ToVector2IntWithoutZ (this Vector3Int v)
 Creates a new Vector2Int keeping the values from the 'x' and 'y' parameters of the original Vector3Int. More...
 
static Vector3Int WithX (this Vector3Int v, int x=0)
 Creates a new vector with the same value for the 'y' and 'z' parameter but a new one for the 'x'. More...
 
static Vector3Int WithY (this Vector3Int v, int y=0)
 Creates a new vector with the same value for the 'x' and 'z' parameter but a new one for the 'y'. More...
 
static Vector3Int WithZ (this Vector3Int v, int z=0)
 Creates a new vector with the same value for the 'x' and 'y' parameter but a new one for the 'z'. More...
 
static Vector3 ToVectorFloat (this Vector3Int v)
 Creates a new Vector3 with the values in the original vector. More...
 
static Vector2 ToVectorFloat (this Vector2Int v)
 Creates a new Vector2 with the values in the original vector. More...
 

Detailed Description

Extensions for VectorInt

Definition at line 6 of file VectorIntExtensions.cs.

Member Function Documentation

◆ Clone() [1/2]

static Vector2Int UnityEngine.VectorIntExtensions.Clone ( this Vector2Int  v)
static

Creates a new vector with the same values as the original.

Returns
A new vector with the same values as the original.

Definition at line 12 of file VectorIntExtensions.cs.

◆ Clone() [2/2]

static Vector3Int UnityEngine.VectorIntExtensions.Clone ( this Vector3Int  v)
static

Creates a new vector with the same values as the original.

Returns
A new vector with the same values as the original.

Definition at line 71 of file VectorIntExtensions.cs.

◆ ToVector2IntWithoutX()

static Vector2Int UnityEngine.VectorIntExtensions.ToVector2IntWithoutX ( this Vector3Int  v)
static

Creates a new Vector2Int keeping the values from the 'y' and 'z' parameters of the original Vector3Int.

Returns
A new Vector2Int with the 'y' and 'z' values equal to the original Vector3Int.

Definition at line 80 of file VectorIntExtensions.cs.

◆ ToVector2IntWithoutY()

static Vector2Int UnityEngine.VectorIntExtensions.ToVector2IntWithoutY ( this Vector3Int  v)
static

Creates a new Vector2Int keeping the values from the 'x' and 'z' parameters of the original Vector3Int.

Returns
A new Vector2Int with the 'x' and 'z' values equal to the original Vector3Int.

Definition at line 89 of file VectorIntExtensions.cs.

◆ ToVector2IntWithoutZ()

static Vector2Int UnityEngine.VectorIntExtensions.ToVector2IntWithoutZ ( this Vector3Int  v)
static

Creates a new Vector2Int keeping the values from the 'x' and 'y' parameters of the original Vector3Int.

Returns
A new Vector2Int with the 'x' and 'y' values equal to the original Vector3Int.

Definition at line 98 of file VectorIntExtensions.cs.

◆ ToVector3IntNewX()

static Vector3Int UnityEngine.VectorIntExtensions.ToVector3IntNewX ( this Vector2Int  v,
int  x = 0 
)
static

Creates a new Vector3Int keeping the values from the 'x' and 'y' parameters of the original Vector2Int in that order.

Parameters
xThe desired value for the 'x' component on the new Vector 3.
Returns
A new Vector3Int with the 'x' and 'y' values equal to the original Vector2Int.

Definition at line 42 of file VectorIntExtensions.cs.

◆ ToVector3IntNewY()

static Vector3Int UnityEngine.VectorIntExtensions.ToVector3IntNewY ( this Vector2Int  v,
int  y = 0 
)
static

Creates a new Vector3Int keeping the values from the 'x' and 'y' parameters of the original Vector2Int in that order.

Parameters
yThe desired value for the 'y' component on the new Vector 3.
Returns
A new Vector3Int with the 'x' and 'y' values equal to the original Vector2Int.

Definition at line 52 of file VectorIntExtensions.cs.

◆ ToVector3IntNewZ()

static Vector3Int UnityEngine.VectorIntExtensions.ToVector3IntNewZ ( this Vector2Int  v,
int  z = 0 
)
static

Creates a new Vector3Int keeping the values from the 'x' and 'y' parameters of the original Vector2Int in that order.

Parameters
zThe desired value for the 'z' component on the new Vector 3.
Returns
A new Vector3Int with the 'x' and 'y' values equal to the original Vector2Int.

Definition at line 62 of file VectorIntExtensions.cs.

◆ ToVectorFloat() [1/2]

static Vector2 UnityEngine.VectorIntExtensions.ToVectorFloat ( this Vector2Int  v)
static

Creates a new Vector2 with the values in the original vector.

Returns
A new Vector2 with the values in the original vector.

Definition at line 146 of file VectorIntExtensions.cs.

◆ ToVectorFloat() [2/2]

static Vector3 UnityEngine.VectorIntExtensions.ToVectorFloat ( this Vector3Int  v)
static

Creates a new Vector3 with the values in the original vector.

Returns
A new Vector3 with the values in the original vector.

Definition at line 137 of file VectorIntExtensions.cs.

◆ WithX() [1/2]

static Vector2Int UnityEngine.VectorIntExtensions.WithX ( this Vector2Int  v,
int  x = 0 
)
static

Creates a new vector with the same value for the 'y' parameter but a new one for the 'x'.

Parameters
xThe desired value for the 'x' component on the new vector.
Returns
A new vector with the same value for the 'y' parameter but a new one for the 'x'.

Definition at line 22 of file VectorIntExtensions.cs.

◆ WithX() [2/2]

static Vector3Int UnityEngine.VectorIntExtensions.WithX ( this Vector3Int  v,
int  x = 0 
)
static

Creates a new vector with the same value for the 'y' and 'z' parameter but a new one for the 'x'.

Parameters
xThe desired value for the 'x' component on the new vector.
Returns
A new vector with the same value for the 'y' and 'z' parameter but a new one for the 'x'.

Definition at line 108 of file VectorIntExtensions.cs.

◆ WithY() [1/2]

static Vector2Int UnityEngine.VectorIntExtensions.WithY ( this Vector2Int  v,
int  y = 0 
)
static

Creates a new vector with the same value for the 'x' parameter but a new one for the 'y'.

Parameters
yThe desired value for the 'y' component on the new vector.
Returns
A new vector with the same value for the 'x' parameter but a new one for the 'y'.

Definition at line 32 of file VectorIntExtensions.cs.

◆ WithY() [2/2]

static Vector3Int UnityEngine.VectorIntExtensions.WithY ( this Vector3Int  v,
int  y = 0 
)
static

Creates a new vector with the same value for the 'x' and 'z' parameter but a new one for the 'y'.

Parameters
yThe desired value for the 'y' component on the new vector.
Returns
A new vector with the same value for the 'x' and 'z' parameter but a new one for the 'y'.

Definition at line 118 of file VectorIntExtensions.cs.

◆ WithZ()

static Vector3Int UnityEngine.VectorIntExtensions.WithZ ( this Vector3Int  v,
int  z = 0 
)
static

Creates a new vector with the same value for the 'x' and 'y' parameter but a new one for the 'z'.

Parameters
zThe desired value for the 'z' component on the new vector.
Returns
A new vector with the same value for the 'x' and 'y' parameter but a new one for the 'z'.

Definition at line 128 of file VectorIntExtensions.cs.


The documentation for this class was generated from the following file: