I have a game with large meshes and I want to save some RAM memory with a byte array of triangles instead the int array. But when I have to pass the array to mesh.triangles I have to convert it to an int array, I tried some methods like putting (int)(Triangles) but I doesn’t work. Here’s the code:
public class Test
{
byte[] Triangles;
void SetTriangles()
{
Mesh mesh = new Mesh();
mesh.triangles = (int[])(Triangles); //It doesn't work!
}
}
Thanks for all!