static void OnPlay(PlayModeStateChange state) { if (state == PlayModeStateChange.ExitingEditMode && requiresUpdate) { requiresUpdate = false; EditorApplication.isPlaying = false; GamePackager.Pack(GamePackager.BASE_DIRECTORY, GamePackager.CACHE_DIRECTORY, () => { AssetDatabase.Refresh(); EditorApplication.isPlaying = true; }); } if (state == PlayModeStateChange.EnteredPlayMode) { requiresUpdate = true; } }
public void OnPreprocessBuild(BuildReport report) { GamePackager.Pack(GamePackager.BASE_DIRECTORY, GamePackager.CACHE_DIRECTORY); }