Description
The Vector3Int.Zero
field represents a static, read-only instance of the Vector3Int
struct where all components (x, y, and z) are set to 0. This is useful for representing a zero vector in integer space, often used as a default or initial value in various calculations and operations involving integer vectors.
Usage
Use Vector3Int.Zero
when you need a vector with no magnitude or direction, such as when initializing variables or resetting values. It is a convenient way to represent the origin in a 3D integer grid.
Example
// Example of using Vector3Int.Zero
Vector3Int position = Vector3Int.Zero;
// Check if a vector is zero
if (position == Vector3Int.Zero)
{
// Do something if the position is at the origin
}