robot_2Generated
code_blocksInput

Description

The Vector2Int.One field is a static, read-only field of the Vector2Int struct. It represents a 2D integer vector where both the X and Y components are set to 1. This field is useful for operations that require a unit vector with integer components, such as scaling or translating objects in a grid-based system.

Usage

You can use Vector2Int.One whenever you need a vector with both components set to 1. This is particularly useful in scenarios where you need to incrementally move or scale objects in both the X and Y directions by a unit step.

Example

// Example of using Vector2Int.One
Vector2Int position = new Vector2Int(5, 10);
Vector2Int newPosition = position + Vector2Int.One;
// newPosition is now (6, 11)