Re-asking this since no-one responded

The Question in Question

Note : I know How to set up materials to use vertex colors, Its a bool, Do not get Code Snobby about that
Appearently I have no practical knowledge on Color Arrays, When I set a Color Or Array.Fill<Color> It doesn’t do anything

private Color[] BiomeColor = new Color[]{};

Is the biome Color I am using, I need this to store colors and display them on top of a greyscaled texture I am using
surfaceTool.AddTriangleFan(triangle1, uvTriangle1, normals: normals, colors: BiomeColor);
Is How I am generating my meshInstance, This does not work, No matter what I try I cannot get any colors to populate / Be displayed by the mesh

you can start by properly formating your code with 3 ` symbols so they get color, and also remember that this is a forum so it can take time for people to answer, and that people are not paid to do so but do so free, and that maybe there isn’t someone who can help you.
also your code is in C# and that reduces the number of people who can help because gdscript is the default godot language.

1 - read the docs.


var array = new Godot.Collections.Array();
array.Resize(5);
array.Fill(2);
GD.Print(array); // Prints [2, 2, 2, 2, 2]

2 - the docs again

add_triangle_fan takes PackedVector2Array, PackedVector3Array and PackedColorArray, which are godot classes. you are trying to use C# arrays.
how is this not throwing errors?

1 Like

Thank you for the help
I got it to work while you typed this


Clown colors