private static void Update() { if (EditorApplication.isCompiling) { // GameDebug.Log("compiling..."); return; } if (m_currentBuildSettings != null) { GameDebug.Log("############################## STARING BUILD : " + m_currentBuildSettings + " #########################"); m_currentBuildSettings.Build(); m_currentBuildSettings = null; SendStatusEvent(); GameDebug.Log("############################## END BUILD ################################"); } if (m_Data.PendingBuilds.Count > 0) { var dataPath = m_Data.PendingBuilds[0]; m_Data.PendingBuilds.RemoveAt(0); // Store queue as it will get destroyed at asssmbly reload (after build or also when doing build?) var str = JsonUtility.ToJson(m_Data); SessionState.SetString(c_SessionStateKey, str); m_currentBuildSettings = AssetDatabase.LoadAssetAtPath <BuildSettings>(dataPath); SendStatusEvent(); EditorApplication.QueuePlayerLoopUpdate(); } }