Example #1
0
        static void Check(string folderLabel, string fileLabel, string typename)
        {
            var status = GetStatus(folderLabel);

            Log("check " + folderLabel + "; status: " + status);

            switch (status)
            {
            case StatusInitial:
                break;

            case StatusSymbolsAdded:
                if (TypeExists(fileLabel, typename))
                {
                    SetStatus(folderLabel, StatusInitial);

                    Log("Type found");
                }
                else
                {
                    Compatibility.ForceRecompileByLabel(folderLabel + FolderSuffix);

                    SetStatus(folderLabel, StatusRecompiledAdded);

                    Log("Type " + typename + " not found, forced recompilation started.");
                }

                break;

            case StatusRecompiledAdded:
                Compatibility.RemoveForceRecompileByLabel(folderLabel + FolderSuffix);

                SetStatus(folderLabel, StatusRecompileRemoved);

                Log("Forced recompilation done; labels removing started");
                break;

            case StatusRecompileRemoved:
                SetStatus(folderLabel, StatusInitial);

                Log("Labels removed.");
                break;

            default:
                Debug.LogWarning("Unknown recompile status: " + status);
                break;
            }
        }
Example #2
0
        static void Check(string folderLabel)
        {
            var status = GetStatus(folderLabel);

            Log("check " + folderLabel + "; status: " + status);

            switch (status)
            {
            case StatusInitial:
                break;

            case StatusSymbolsAdded:
                Compatibility.ForceRecompileByLabel(folderLabel + FolderSuffix);

                SetStatus(folderLabel, StatusRecompiledAdded);

                Log("Forced recompilation started.");
                break;

            case StatusRecompiledAdded:
                Compatibility.RemoveForceRecompileByLabel(folderLabel + FolderSuffix);

                SetStatus(folderLabel, StatusRecompileRemoved);

                Log("Forced recompilation done; labels removing started");
                break;

            case StatusRecompileRemoved:
                SetStatus(folderLabel, StatusInitial);

                Log("Labels removed.");
                break;

            default:
                Debug.LogWarning("Unknown recompile status: " + status);
                break;
            }
        }