The error is thrown before reaching that line:
var a = BlockRenderData.vertices[face[0]] + blockPosition;
I’ve written a procedural world generation script using C# in Godot 4, but it’s throwing an error on project startup. Even though I’m using Tool, the visual representation of my chunks isn’t being generated, no matter how many times I reload the project. The debugger is complaining about something related to “face” and determining the corners of a square, but I can’t figure out how to fix it. What’s wrong with my code and how can I resolve this issue? Any help would be greatly appreciated!

*Tuttorial link -