public static BuildReport RunBuild()
        {
            BuildLogger.LogHeader("Starting BuildPipeline for WEBGL");

            var buildOptions = GetBuildPlayerOptions();

            BuildLogger.LogSeparator("Running BuildPlayer");

            return(BuildPipeline.BuildPlayer(buildOptions));
        }
        private static void Setup()
        {
            BuildLogger.LogSeparator("Setting up build environment");

            var environmentConfig = BuildConfig.ReadEnvironmentConfig();

            EditorPrefs.SetString("AndroidSdkRoot", environmentConfig.AndroidSdkRoot);
            EditorPrefs.SetString("AndroidNdkRoot", environmentConfig.AndroidNdkRoot);
            EditorPrefs.SetString("JdkPath", environmentConfig.JavaRoot);
        }
        private static BuildPlayerOptions GetBuildPlayerOptions()
        {
            BuildLogger.LogSeparator("Generating Build Options");

            var projectConfig = BuildConfig.ReadProjectConfig();
            var scenePaths    = BuildUtils.GetScenePaths();

            BuildLogger.Log($"BuildArtifactPath: {projectConfig.WebGlBuildName}");
            BuildLogger.LogArray("Scenes:", scenePaths);

            return(new BuildPlayerOptions()
            {
                scenes = scenePaths,
                locationPathName = projectConfig.WebGlBuildName,
                target = BuildTarget.WebGL,
                options = BuildOptions.None
            });
        }