Пример #1
0
        private static void CreateCheatsSettingsEditor(out Editor editor)
        {
            // get cheatsSettings
            CheatsSettings cheatsSettings = CheatsSettings.GetOrCreateSettings();
            var            serializedObjectCheatsSettings = new SerializedObject(cheatsSettings);

            editor = Editor.CreateEditor(cheatsSettings);
        }
Пример #2
0
        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--;
            }
        }