Hello guys,
as i said in the title i want to change enum values.Script works fine, when i am setting new value it goes back to zero never sets a new value sorry for bad english and thanks.
Code:
string[] names = Enum.GetNames(typeof(Enemy.CombatSkills));
int[] vals = (int[])Enum.GetValues(typeof(Enemy.CombatSkills));
for(int y = 0; y < Enum.GetValues(typeof(Enemy.CombatSkills)).Length;y++)
{
EditorGUILayout.BeginHorizontal();
EditorGUI.indentLevel += 1;
vals[y] = EditorGUILayout.IntField(names[y],vals[y]);
EditorGUI.indentLevel -= 1;
EditorGUILayout.EndHorizontal();
}