Answers for "godot 2d array"

0

godot 2d array

#creating 2D Arrays in GDscript
var my_array = [[]]

var width = 5
var height = 5

func _ready():
	#setting 2D Array size
	for x in width:
		my_array.resize(width)
    
		for y in height:
			my_array[x].resize(y)
          
	#setting a value
    my_array[0][0] = 1
Posted by: Guest on July-06-2020

Python Answers by Framework

Browse Popular Code Answers by Language