Material Box

Material Box

WEB Design & Material Images

Godot - Initialize array

Godot

GDScript code example to initialize array.


Can initialize array using clear() in GDScript.\r
This returns an empty array.

var array = ["apple", "lemon"]
array.clear()

print(array)
# []

Result of clear() and following process is equivalent.

var array = ["apple", "lemon"]
array = []

print(array)
# []

Godot

TitleGodot - Initialize array

CategoryGodot

Created

Update

AuthorYousuke.U