argh! hi guys, im not sure what im doing wrong here…
im trying to use RGBA but cant get it working… any ideas?
using UnityEngine;
using System.Collections;
public class ExampleClass : MonoBehaviour {
public Color32[] values;
public int i=6;
void Start() {
foreach (Color32 value in values) {
print(value);
}
values = new Color32*;*
The way to define a new struct value is still to pass through its constructor:
values[0] = new Color32(1,1,1,1);
Add “new”.
Also note your use of Color32. The documentation reads:
Each color component is a byte value with a range from 0 to 255.
Components (r,g,b) define a color in RGB color space. Alpha component (a) defines transparency - alpha of 255 is completely opaque, alpha of zero is completely transparent.
You’re getting a very transparent almost-black with (1,1,1,1)