Ejemplo n.º 1
0
        /// <summary>
        /// 创建卸载场景成功事件。
        /// </summary>
        /// <param name="e">内部事件。</param>
        /// <returns>创建的卸载场景成功事件。</returns>
        public static OuterUnloadSceneSuccessEventArgs Create(InnerUnloadSceneSuccessEventArgs e)
        {
            OuterUnloadSceneSuccessEventArgs unloadSceneSuccessEventArgs = ReferencePool.Acquire <OuterUnloadSceneSuccessEventArgs>();

            unloadSceneSuccessEventArgs.SceneAssetName = e.SceneAssetName;
            unloadSceneSuccessEventArgs.UserData       = e.UserData;
            return(unloadSceneSuccessEventArgs);
        }
Ejemplo n.º 2
0
 private void UnloadSceneSuccessCallback(string sceneAssetName, object userData)
 {
     m_UnloadingSceneAssetNames.Remove(sceneAssetName);
     m_LoadedSceneAssetNames.Remove(sceneAssetName);
     if (m_UnloadSceneSuccessEventHandler != null)
     {
         InnerUnloadSceneSuccessEventArgs unloadSceneSuccessEventArgs = InnerUnloadSceneSuccessEventArgs.Create(sceneAssetName, userData);
         m_UnloadSceneSuccessEventHandler(this, unloadSceneSuccessEventArgs);
         ReferencePool.Release(unloadSceneSuccessEventArgs);
     }
 }