Exemple #1
0
    public static void OnPostProcessBuild(BuildTarget target, string pathToBuiltProject)
    {
        if (!ConfigSettings.Instance.CheckConfig)
        {
            return;
        }
        Debug.Log("CheckConfig PostProcessBuild");
        #if UNITY_5 || UNITY_2017 || UNITY_2017_1_OR_NEWER
        if (target == BuildTarget.iOS)
        {
    #else
        if (target == BuildTarget.iPhone)
        {
    #endif
            check = new CheckConfigIOS(pathToBuiltProject);
        }
        else if (target == BuildTarget.Android)
        {
            check = new CheckConfigAndroid(pathToBuiltProject);
        }
        check.Check();
        CheckResult.WriteTo(checkResultFile, check.result);

        CheckResult testResult = CheckResult.ReadFrom(checkResultFile);
        if (testResult == null)
        {
            Debug.LogError("Get check result error!");
        }
        else
        {
            ShowResult();
        }
    }