Arr

gdext.builtin.Arr
See theArr companion object
final class Arr[A] extends AutoCloseable

A typed view over Godot's GArray — Arr[A]. Elements marshal through the ToVariant/FromVariant seam, so any builtin- or (where a given exists) object-convertible A works. The sibling of Dict for sequences.

The backing 8-byte Array handle is heap-owned so an Arr can live in a class field (an exported property) for the object's lifetime. As with the rest of the binding, freeing is explicit / process-lifetime (Phase 4 lifetimes).

Attributes

Companion
object
Graph
Supertypes
trait AutoCloseable
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def append(value: A): Unit
def apply(i: Int): A
def close(): Unit
def foreach(f: A => Unit): Unit
def free(): Unit

Release this handle's reference to the engine Array and its storage. Idempotent; any later use throws. An exported Arr property is released by the binding when the property is overwritten or the instance is freed.

Release this handle's reference to the engine Array and its storage. Idempotent; any later use throws. An exported Arr property is released by the binding when the property is overwritten or the instance is freed.

Attributes

def isEmpty: Boolean
def iterator: Iterator[A]
def size: Int