コード例 #1
0
        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;
            }
        }
コード例 #2
0
 public void OnPreprocessBuild(BuildReport report)
 {
     GamePackager.Pack(GamePackager.BASE_DIRECTORY, GamePackager.CACHE_DIRECTORY);
 }