Beispiel #1
0
    private static string GetGmcs()
    {
        PreComileConfiger.Load();
        var gmcs = PreComileConfiger.gmcs;

        if (string.IsNullOrEmpty(gmcs) || !File.Exists(gmcs))
        {
            EditorUtility.DisplayDialog("PreCompile", "Select gmcs", "select");
            string path = EditorUtility.OpenFilePanel("select gmcs", "/Applications/Unity/Unity.app/Contents/Mono/bin", "");
            if (string.IsNullOrEmpty(path))
            {
                Debug.LogError("canceled");
                return(null);
            }
            if (!Path.GetFileName(path).Contains("mcs"))
            {
                Debug.LogError("file name must be gmcs");
                return(null);
            }
            gmcs = path;
            PreComileConfiger.gmcs = gmcs;
            PreComileConfiger.Save();
        }
        return(gmcs);
    }
Beispiel #2
0
    private static string GetManaged()
    {
        PreComileConfiger.Load();
        var managed = PreComileConfiger.managed;

        if (string.IsNullOrEmpty(managed) || !Directory.Exists(managed))
        {
            EditorUtility.DisplayDialog("PreCompile", "Select dir: Managed", "select");
            string path = EditorUtility.OpenFolderPanel("select gmcs", "/Applications/Unity/Unity.app/Contents", "");
            if (string.IsNullOrEmpty(path))
            {
                Debug.LogError("canceled");
                return(null);
            }
            if (Path.GetFileName(path) != "Managed")
            {
                Debug.LogError("dir name must be Managed");
                return(null);
            }
            managed = path;
            PreComileConfiger.managed = managed;
            PreComileConfiger.Save();
        }
        return(managed);
    }