Hi there,
I am currently working on my first Unity project and after some fiddling around I finally worked out how to correctly display a solid colored rectangle. The approach I am using is as follows:
// inside onGUI()
rect.tx2DFlash.SetPixel(1,1,'SOME_COLOR');
rect.tx2DFlash.Apply();
GUI.DrawTexture(new Rect(rect.X, rect.Y, 40, 40), rect.tx2DFlash)
// inside onGui()
This code is working fine. When i try to use it to create 100 rectangles with each having a different color changing every frame, the code still works. The problem I run into is the amount of drawcalls (about 100) that are being made. On my PC the code is working but on a device I am only getting like 4 fps.
Is there a way to efficiently create simple rectangles with each having a different color changing each frame?
Thanks in advance!