Godot 4.2.2
I’m trying to pass a 2D array to a C# function that requires it to be structured as int[,] rather than int. The array is randomly generated and will look something like this:
[[1, 1, 0, 1, 0, 1, 1],
[0, 1, 0, 1, 1, 1, 1],
[1, 1, 0, 1, 0, 1, 1],
[0, 1, 1, 1, 1, 1, 1],
[1, 1, 1, 1, 0, 1, 1],
[1, 0, 1, 1, 1, 0, 1],
[1, 1, 0, 1, 1, 1, 1]]
Alternatively, if someone is able to show me a solution for using Godot’s built in AStar tools (which I have not been able to get working thus far), that would work as well. I’m using the C# code from here and outside of not being able to pass the array to it, it seems to work in an isolated environment.
I can’t pass it directly without getting the “Invalid call. Nonexistent function FunctionName
” because the array supplied doesn’t count as the right kind of 2D array.