public override void OnInspectorGUI()
    {
        serializedObject.Update();

        EditorGUILayout.Space();

        SerializedProperty enableAds = serializedObject.FindProperty("enableAds");

        EditorGUILayout.PropertyField(enableAds);

        if (enableAds.boolValue)
        {
                        #if !UNITY_ANDROID && !UNITY_IOS
            EditorGUILayout.HelpBox("Ads only supported on Android and iOS platforms.", MessageType.Warning);
            GUI.enabled = false;
                        #elif !UNITY_ADS
            EditorGUILayout.HelpBox("You must enable Unity Ads for you project.", MessageType.Warning);
            GUI.enabled = false;
                        #endif

            EditorGUILayout.PropertyField(serializedObject.FindProperty("zoneId"));
            EditorGUILayout.PropertyField(serializedObject.FindProperty("adLevelCompleteAmount"));

            GUI.enabled = true;
        }

        EditorGUILayout.Space();

        EditorGUILayout.PropertyField(serializedObject.FindProperty("startingHints"));
        EditorGUILayout.PropertyField(serializedObject.FindProperty("letterBoard"));
        EditorGUILayout.PropertyField(serializedObject.FindProperty("wordGrid"));
        EditorGUILayout.PropertyField(serializedObject.FindProperty("letterTilePrefab"));

        DrawCategoryInfos();
        DrawDailyPuzzleLevels();

        EditorGUILayout.Space();

        if (GUILayout.Button("Delete Saved Data"))
        {
            System.IO.File.Delete(GameManager.SaveDataPath);
        }

        if (GUILayout.Button("Open Board File Creator Window"))
        {
            BoardFileCreatorWindow.ShowWindow();
        }

        EditorGUILayout.Space();

        serializedObject.ApplyModifiedProperties();
    }
Example #2
0
    public override void OnInspectorGUI()
    {
        serializedObject.Update();

        //ReorderableListGUI.Title("Category Infos");
        //ReorderableListGUI.ListField(categoryInfos);

        EditorGUILayout.Space();


        EditorGUILayout.PropertyField(serializedObject.FindProperty("startingHints"));
        EditorGUILayout.PropertyField(serializedObject.FindProperty("letterBoard"));
        EditorGUILayout.PropertyField(serializedObject.FindProperty("wordGrid"));
        EditorGUILayout.PropertyField(serializedObject.FindProperty("letterTilePrefab"));
        EditorGUILayout.PropertyField(serializedObject.FindProperty("rewardedButton"));

        DrawCategoryInfos();
        DrawDailyPuzzleLevels();

        EditorGUILayout.Space();

        categoryNumber = EditorGUILayout.IntField("Category Number: ", categoryNumber);
        levelNumber    = EditorGUILayout.IntField("Category Number: ", levelNumber);

        if (GUILayout.Button("Create board file", GUILayout.MinHeight(30)))
        {
            CategoryInfo currentCategoryInfo = instance.CategoryInfos[categoryNumber - 1];
            string       boardId             = Utilities.FormatBoardId(currentCategoryInfo.name, levelNumber - 1);

            wordBoardCreator.StartCreatingBoard(boardId, currentCategoryInfo.levelInfos[levelNumber - 1].words, OnWordBoardFinished, 5000L);
        }

        EditorGUILayout.Space();

        if (GUILayout.Button("Delete Saved Data", GUILayout.MinHeight(30)))
        {
            System.IO.File.Delete(GameManager.SaveDataPath);
        }

        EditorGUILayout.Space();

        if (GUILayout.Button("Open Board File Creator Window", GUILayout.MinHeight(30)))
        {
            BoardFileCreatorWindow.ShowWindow();
        }

        EditorGUILayout.Space();

        serializedObject.ApplyModifiedProperties();
    }
Example #3
0
    public override void OnInspectorGUI()
    {
        serializedObject.Update();

        EditorGUILayout.Space();

        EditorGUILayout.PropertyField(serializedObject.FindProperty("startingHints"));
        EditorGUILayout.PropertyField(serializedObject.FindProperty("adLevelCompleteAmount"));
        EditorGUILayout.PropertyField(serializedObject.FindProperty("letterBoard"));
        EditorGUILayout.PropertyField(serializedObject.FindProperty("wordGrid"));
        EditorGUILayout.PropertyField(serializedObject.FindProperty("letterTilePrefab"));

        DrawCategoryInfos();
        DrawDailyPuzzleLevels();

        EditorGUILayout.Space();

        EditorGUILayout.PropertyField(serializedObject.FindProperty("iapHintInfos"), true);

        EditorGUILayout.Space();

        if (GUILayout.Button("Delete Saved Data"))
        {
            System.IO.File.Delete(GameManager.SaveDataPath);
            PlayerPrefs.DeleteAll();
        }

        if (GUILayout.Button("Open Board File Creator Window"))
        {
            BoardFileCreatorWindow.ShowWindow();
        }

        EditorGUILayout.Space();

        serializedObject.ApplyModifiedProperties();
    }