// called by Unity
        public void OnPostprocessBuild(BuildReport report)
        {
            if (!ACTkSettings.Instance.PreGenerateBuildHash || !CodeHashGenerator.IsTargetPlatformCompatible())
            {
                return;
            }

            try
            {
                EditorUtility.DisplayProgressBar("ACTk: Generating code hash", "Preparing...", 0);
                var hashedBuilds = GetHashedBuilds(report);

                if (hashedBuilds == null || hashedBuilds.Count == 0)
                {
                    Debug.Log(ACTkConstants.LogPrefix + "Couldn't pre-generate code hash. " +
                              "Please run your build and generate hash with CodeHashGenerator.");
                    return;
                }

                foreach (var hashedBuild in hashedBuilds)
                {
                    hashedBuild.PrintToConsole();
                }

#pragma warning disable 618
                if (HashesGenerate != null)
                {
                    var obsoleteDictionary = new Dictionary <string, string>();
                    foreach (var hashedBuild in hashedBuilds)
                    {
                        obsoleteDictionary.Add(hashedBuild.BuildPath, hashedBuild.SummaryHash);
                    }
                    HashesGenerate.Invoke(report, obsoleteDictionary);
                }
#pragma warning restore 618

                if (HashesGenerated != null)
                {
                    HashesGenerated.Invoke(report, hashedBuilds.ToArray());
                }
            }
            catch (Exception e)
            {
                Debug.LogError(e);
            }
            finally
            {
                EditorUtility.ClearProgressBar();
            }
        }
        // called by Unity
        public void OnPostprocessBuild(BuildReport report)
        {
            if (!ACTkSettings.Instance.PreGenerateBuildHash || !CodeHashGenerator.IsTargetPlatformCompatible())
            {
                return;
            }

            try
            {
                EditorUtility.DisplayProgressBar("ACTk: Generating code hash", "Preparing...", 0);
                var hashes = GetHashes(report);

                if (hashes == null || hashes.Count == 0)
                {
                    Debug.Log(ACTkConstants.LogPrefix + "Couldn't pre-generate code hash. " +
                              "Please run your build and generate hash with CodeHashGenerator.");
                    return;
                }

                foreach (var hash in hashes)
                {
                    Debug.Log(ACTkConstants.LogPrefix + "Pre-generated code hash: " + hash.Value + "\nBuild: " + hash.Key);
                }

                if (HashesGenerate != null)
                {
                    HashesGenerate.Invoke(report, hashes);
                }
            }
            catch (Exception e)
            {
                Debug.LogError(e);
            }
            finally
            {
                EditorUtility.ClearProgressBar();
            }
        }