기술 자료

Unity Engine

Unity Engine

Contains

Returns true if the given position is within the RectInt.
읽는 시간 1분최근 업데이트: 한 달 전

Definition

  • Type: Method
  • Namespace: UnityEngine
  • Assembly: UnityEngine.CoreModule

Contains(Vector2Int)

Returns true if the given position is within the RectInt.
public readonly bool Contains(Vector2Int position)

Parameters

position

Position to check.

Returns

Type

Description

boolWhether the position is within the RectInt.

Remarks

A point is considered to lie within the RectInt if its coordinates are greater than or equal to the RectInt's min coordinates, and less than the RectInt's max coordinates.

Contains(Vector2Int)

Returns true if the given position is within the RectInt.
public readonly bool Contains(in Vector2Int position)

Parameters

position

Position to check.

Returns

Type

Description

boolWhether the position is within the RectInt.

Remarks

A point is considered to lie within the RectInt if its coordinates are greater than or equal to the RectInt's min coordinates, and less than the RectInt's max coordinates.