book_4_sparkGenerated
code_blocksInput

Description

The Vector3Int.OneZ field is a static member of the Vector3Int struct. It represents an integer vector where the Z component is set to 1, while the X and Y components are set to 0. This field is useful for operations that require a unit vector along the Z-axis in integer space.

Usage

You can use Vector3Int.OneZ whenever you need a vector that points in the positive Z direction with a magnitude of 1. This is particularly useful in grid-based systems or when working with integer-based vector calculations where you need to isolate or emphasize the Z component.

Example

// Example usage of Vector3Int.OneZ
Vector3Int vector = Vector3Int.OneZ;

// This will output: (0, 0, 1)
Debug.Log(vector);