Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


NewObjectArray(int, nint, nint)

Constructs a new array holding objects in class \<tt\>clazz\</tt\>. All elements are initially set to \<tt\>obj\</tt\>.
Read time 1 minuteLast updated 6 days ago

Definition

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

NewObjectArray(int, IntPtr, IntPtr)

public static nint NewObjectArray(int size, nint clazz, nint obj)

Parameters

size

The number of elements in the array to construct.

clazz

The element class of the array to construct.

The value used to initialize every element of the array.

Returns

Type

Description

IntPtrA local reference to the newly constructed Java array.

Remarks