private bool CreateNewLevel(string problemString, int[] targets)
        {
#if UNITY_EDITOR
            RuleSettings newRule = ScriptableObject.CreateInstance <RuleSettings>();
            newRule.Id            = GUID.Generate().ToString();
            newRule.levelData     = problemString;
            newRule.targetIndexes = targets;
            newRule.IsFtueGame    = ftueToggle.isOn;
            if (newRule.IsRuleValid())
            {
                string ftuePrefix = newRule.IsFtueGame ? "FTUE" : "";
                AssetDatabase.CreateAsset(newRule, $"Assets/Speedoku/Settings/Levels/Level{ftuePrefix}{newRule.Id}.asset");
                if (!newRule.IsFtueGame)
                {
                    GlobalSettings settings = (GlobalSettings)AssetDatabase.LoadAssetAtPath("Assets/Speedoku/Settings/GlobalSettings.asset", typeof(GlobalSettings));
                    settings.RulesList.Add(newRule);
                    EditorUtility.SetDirty(settings);
                }
                AssetDatabase.SaveAssets();
                return(true);
            }
#endif

            return(false);
        }
        public void OnPreprocessBuild(BuildReport report)
        {
            //throw new System.NotImplementedException();
            Debug.Log($"[PreBP] Pre build process -> {report}");

            GlobalSettings settings = (GlobalSettings)AssetDatabase.LoadAssetAtPath("Assets/Speedoku/Settings/GlobalSettings.asset", typeof(GlobalSettings));

            if (settings.Coins.StartCoinCount <= 0)
            {
                Debug.LogError($"[ERROR][SETTINGS] Coin start count: {settings.Coins.StartCoinCount}");
            }

            for (int i = 0; i < settings.RulesList.Count; i++)
            {
                RuleSettings rule = settings.RulesList[i];
                if (!rule.IsRuleValid())
                {
                    Debug.LogError($"[ERROR][SETTINGS] Rule {i} is INVALID");
                }
            }
        }