using UnityEngine;
using System.Collections;
public class Test : MonoBehaviour {
public byte speed = 8;
public byte size = 5;
public byte health = 4;
public void Start () {
byte[] bytes = new byte[3] {
speed,
size,
health
};
foreach (byte item in bytes) {
Debug.Log(item.ToString());
}
}
}
They did get another value. When they are public, they are exposed to the Unity Inspector and its serialization. I would guess that at some point you set them, in the script or in the inspector, as 1, and Unity simply serialized that value. At that point, changing the value in the script meant nothing.