robot_2Generated
code_blocksInput

Description

The Vector2Int.Up field is a static, read-only field of the Vector2Int struct. It represents a 2D integer vector pointing upwards, with the Y component set to 1 and the X component set to 0. This field is useful for operations that require a standard upward direction in a 2D space.

Usage

You can use Vector2Int.Up whenever you need a vector that points upwards 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.Up
Vector2Int position = new Vector2Int(5, 5);
Vector2Int newPosition = position + Vector2Int.Up;
// newPosition is now (5, 6)