Interface ExternalArrayData

All Known Implementing Classes:
NativeFloat32Array, NativeFloat64Array, NativeInt16Array, NativeInt32Array, NativeInt8Array, NativeTypedArrayView, NativeUint16Array, NativeUint32Array, NativeUint8Array, NativeUint8ClampedArray

public interface ExternalArrayData
Implement this interface in order to allow external data to be attached to a ScriptableObject.
  • Method Summary

    Modifier and Type
    Method
    Description
    getArrayElement(int index)
    Return the element at the specified index.
    int
    Return the length of the array.
    void
    setArrayElement(int index, Object value)
    Set the element at the specified index.
  • Method Details

    • getArrayElement

      Object getArrayElement(int index)
      Return the element at the specified index. The result must be a type that is valid in JavaScript: Number, String, or Scriptable. This method will not be called unless "index" is in range.
    • setArrayElement

      void setArrayElement(int index, Object value)
      Set the element at the specified index. This method will not be called unless "index" is in range. The method must check that "value" is a valid type, and convert it if necessary.
    • getArrayLength

      int getArrayLength()
      Return the length of the array.