public static bool TryWeaveAssembly(string assemblyAssetPath)
        {
            var settings = ReflectionBakingInternalUtil.TryGetEnabledSettingsInstance();

            if (settings == null)
            {
                return(false);
            }

            var stopwatch = new Stopwatch();

            stopwatch.Start();

            var runner = new ReflectionBakingRunner(settings);

            int numTypesChanged = runner.Run(assemblyAssetPath);

            stopwatch.Start();

            if (numTypesChanged > 0)
            {
                UnityEngine.Debug.Log("Added reflection baking to '{0}' types in assembly '{1}', took {2:0.00} seconds"
                                      .Fmt(numTypesChanged, Path.GetFileName(assemblyAssetPath), stopwatch.Elapsed.TotalSeconds));
                return(true);
            }

            return(false);
        }
        static void OnAssemblyCompiled(string assembly, CompilerMessage[] messages)
        {
#if !UNITY_2018
            if (Application.isEditor && !BuildPipeline.isBuildingPlayer)
            {
                return;
            }
#endif

            if (EditorUserBuildSettings.activeBuildTarget == BuildTarget.WSAPlayer)
            {
                Log.Warn("Zenject reflection baking skipped because it is not currently supported on WSA platform!");
            }
            else
            {
                ReflectionBakingRunner.TryWeaveAssembly(assembly);
            }
        }