I am trying to make an editor extension for Unity that reads a class named Attack, but C# is not throwing back a NullReferenceException when try to set the object.
This is where the problem lies:
void OnGUI(){
EditorGUIUtility.labelWidth = 60;
GUILayout.Label("Attack Manager", EditorStyles.boldLabel);
Attacks[DataStrings.Length - 1] = new Attack();
if (DataStrings != null){
foreach(string Dataline in DataStrings){
Attacks[i] = new Attack();
Attacks[i] = JsonUtility.FromJson<Attack>(DataStrings[i]);
NewAttack(true);
i++;
}
}