Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


NewGlobalRef(nint)

Creates a new global reference to the object referred to by the \<tt\>obj\</tt\> argument.
Read time 1 minuteLast updated 5 days ago

Definition

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

NewGlobalRef(IntPtr)

public static nint NewGlobalRef(nint obj)

Parameters

The reference to convert.

Returns

Type

Description

IntPtrThe new reference, or null if the object referred to by the original reference has already been garbage collected.

Remarks