Exemple #1
0
        public void Dispose()
        {
            if (m_Builder != null)
            {
                m_Builder.Dispose();
            }

            BuildStopped?.Invoke();
        }
        /// <summary>
        /// Builds the binary for this asset
        /// </summary>
        public void BuildSync()
        {
            EditorUtility.DisplayProgressBar($"Building Kinematica Asset {name}.asset", "", 0.0f);

            using (BuildProcess buildProcess = BuildAsync())
            {
                BuildStarted?.Invoke();
                buildProcess.Builder.progressFeedback += progressInfo => EditorUtility.DisplayProgressBar($"Building Kinematica Asset {name}.asset", progressInfo.title, progressInfo.progress);

                while (!buildProcess.IsFinished)
                {
                    buildProcess.FrameUpdate();
                }

                BuildStopped?.Invoke();
            }

            EditorUtility.ClearProgressBar();
        }
 void OnBuildStopped()
 {
     m_CurrentBuildProcess.BuildStopped -= OnBuildStopped;
     m_CurrentBuildProcess = null;
     BuildStopped?.Invoke();
 }