private static void CreateCheatsSettingsEditor(out Editor editor) { // get cheatsSettings CheatsSettings cheatsSettings = CheatsSettings.GetOrCreateSettings(); var serializedObjectCheatsSettings = new SerializedObject(cheatsSettings); editor = Editor.CreateEditor(cheatsSettings); }
void DrawCheats() { var cheatsSettings = CheatsSettings.GetOrCreateSettings(); if (cheatsSettings.Cheats.Length == 0) { // warn the user that there is no cheat DrawCheatsEmptyLabel(); } else { EditorGUI.indentLevel++; foreach (var cheat in cheatsSettings.Cheats) { DrawCheat(cheat); } EditorGUI.indentLevel--; } }