book_4_sparkGenerated
code_blocksInput

Description

The Vector2Int.Right field is a static, public field of type Vector2Int. It represents a directional vector pointing to the right, with the X component set to 1 and the Y component set to 0. This field is useful for operations that require a standard rightward direction in a 2D integer vector space.

Usage

You can use Vector2Int.Right whenever you need a vector that points to the right in a 2D grid or coordinate system. This is particularly useful in game development for movement, alignment, or directional calculations.

Example

// Example of using Vector2Int.Right
Vector2Int position = new Vector2Int(5, 5);
Vector2Int newPosition = position + Vector2Int.Right;
// newPosition is now (6, 5), moved one unit to the right