LanguageEnglish
  • C#
  • JS

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

This version of Unity is unsupported.

RectInt.Contains

public bool Contains(Vector2Int position);

Parameters

positionPosition to check.
inclusiveWhether the max limits are included in the check.

Returns

bool Whether the position is within the RectInt.

Description

Returns true if the given position is within the RectInt.