Hi there! Long time developer, amateur coder. I'm calling a method every few frames that contains this:
Texture2D texture = (Texture2D)Resources.Load("mytexture");
var fow = FsmVariables.GlobalVariables.GetFsmArray("MyColorArray").vector4Values;
...and then I'm applying those values to a texture using this:
texture.SetPixel(4, 13, fow[0]);
texture.SetPixel(5, 13, fow[1]);
texture.SetPixel(6, 13, fow[2]);
texture.SetPixel(7, 13, fow[3]);
texture.SetPixel(8, 13, fow[4]);
texture.SetPixel(9, 13, fow[5]);
texture.SetPixel(10, 13, fow[6]);
texture.Apply();
For some reason updated colors in the array won't update on the texture, but if I wiggle the playmaker Global Variables Tab, it WILL update. What am i missing here? Do i need to manually refresh the array in my script somehow? Something else? Thank you for your help!