book_4_sparkGenerated
code_blocksInput

Description

The Vector2Int.Left field is a static, public field of type Vector2Int. It represents a directional vector pointing to the left, with the X component set to -1 and the Y component set to 0. This field is useful for operations that require a consistent leftward direction in a 2D integer grid or coordinate system.

Usage

Use Vector2Int.Left when you need a predefined vector that points to the left in a 2D space. This can be particularly useful in game development or graphical applications where directional vectors are needed for movement, alignment, or calculations.

Example

// Example usage of Vector2Int.Left
Vector2Int position = new Vector2Int(5, 5);
Vector2Int newPosition = position + Vector2Int.Left;
// newPosition is now (4, 5), moved one unit to the left