Up to date

This page is up to date for Godot 4.2. If you still find outdated information, please open an issue.

PackedColorArray

A packed array of Colors.

Description

An array specifically designed to hold Color. Packs data tightly, so it saves memory for large array sizes.

Примітка

There are notable differences when using this API with C#. See Відмінності API C# в GDScript for more information.

Constructors

PackedColorArray

PackedColorArray ( )

PackedColorArray

PackedColorArray ( PackedColorArray from )

PackedColorArray

PackedColorArray ( Array from )

Methods

bool

append ( Color value )

void

append_array ( PackedColorArray array )

int

bsearch ( Color value, bool before=true )

void

clear ( )

int

count ( Color value ) const

PackedColorArray

duplicate ( )

void

fill ( Color value )

int

find ( Color value, int from=0 ) const

bool

has ( Color value ) const

int

insert ( int at_index, Color value )

bool

is_empty ( ) const

bool

push_back ( Color value )

void

remove_at ( int index )

int

resize ( int new_size )

void

reverse ( )

int

rfind ( Color value, int from=-1 ) const

void

set ( int index, Color value )

int

size ( ) const

PackedColorArray

slice ( int begin, int end=2147483647 ) const

void

sort ( )

PackedByteArray

to_byte_array ( ) const

Operators

bool

operator != ( PackedColorArray right )

PackedColorArray

operator + ( PackedColorArray right )

bool

operator == ( PackedColorArray right )

Color

operator [] ( int index )


Constructor Descriptions