文档

Unity Engine

Unity Engine

IsSameObject(nint, nint)

Tests whether two references refer to the same Java object.
阅读时间1 分钟最后更新于 1 个月前

Definition

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

IsSameObject(IntPtr, IntPtr)

public static bool IsSameObject(nint obj1, nint obj2)

Parameters

obj1

The first reference to compare.

obj2

The second reference to compare.

Returns

Type

Description

boolTrue if both references refer to the same Java object, or are both null. Otherwise, false.

Remarks