internal void Build(string endMessage = "Build Complete") { platform = GetPlatform(); if (platform == null || platform.Length == 0) { throw new ArgumentException("no platform is selected."); } var allProgress = Enum.GetValues(typeof(BuildProgress)).Length; try { for (int i = ( int )Progress; i <= ( int )ProgressEnd; i++) { Progress = ( BuildProgress )i; EditorUtility.DisplayProgressBar("EasyAssetBundle", string.Format("Progress at < {0} >", Progress.ToString()), ( float )i / ( float )allProgress); buildProcessor(Progress); } Debug.Log(endMessage); } catch (Exception ex) { Debug.LogError("AssetBundle BuildProcess results in failure. \n" + ex); Debug.LogError(string.Format("Progress end at < {0} >.", Progress.ToString())); } EditorUtility.ClearProgressBar(); if (OnBuildProcessEnd != null) { OnBuildProcessEnd(); } }