Component field instance issues - field changes affect all objects with component
I have a gameobject that added a custom component to, lets call it UnitClass. These are some of the fields that it uses
public class UnitClass : MonoBehaviour {
public string uiName;
public int movementDist;
public int rangeDist;
public int baseDam;
public List<Vector3> nodeList;
public Color32 color;
}
When i instantiate two gameobjects and add the component to both of them, i can see in the editor that the component is there and all the fields can be edited. here's the issue
When i edit the fields in the scene editor most of them will be instance based. For example, if i change GameObject1's UnitClass component field uiName to "test", it will only apply to GameObject1 and GameObject2's uiName will be blank. However;
When I change GameObject1's nodeList through code, GameObject2 will inherit the same values. This only applies to that specific field for some odd reason.
Is there something i'm missing? is this supposed to happen only to list types?