private void OnLoadSceneDependencyAsset(object sender, GameFramework.Scene.LoadSceneDependencyAssetEventArgs e) { if (m_EnableLoadSceneDependencyAssetEvent) { _eventComponent.Fire(this, ReferencePool.Acquire <LoadSceneDependencyAssetEventArgs>().Fill(e)); } }
/// <summary> /// 初始化加载场景时加载依赖资源事件的新实例。 /// </summary> /// <param name="e">内部事件。</param> public LoadSceneDependencyAssetEventArgs(GameFramework.Scene.LoadSceneDependencyAssetEventArgs e) { SceneAssetName = e.SceneAssetName; DependencyAssetName = e.DependencyAssetName; LoadedCount = e.LoadedCount; TotalCount = e.TotalCount; UserData = e.UserData; }
/// <summary> /// 创建加载场景时加载依赖资源事件。 /// </summary> /// <param name="e">内部事件。</param> /// <returns>创建的加载场景时加载依赖资源事件。</returns> public static LoadSceneDependencyAssetEventArgs Create(GameFramework.Scene.LoadSceneDependencyAssetEventArgs e) { LoadSceneDependencyAssetEventArgs loadSceneDependencyAssetEventArgs = ReferencePool.Acquire <LoadSceneDependencyAssetEventArgs>(); loadSceneDependencyAssetEventArgs.SceneAssetName = e.SceneAssetName; loadSceneDependencyAssetEventArgs.DependencyAssetName = e.DependencyAssetName; loadSceneDependencyAssetEventArgs.LoadedCount = e.LoadedCount; loadSceneDependencyAssetEventArgs.TotalCount = e.TotalCount; loadSceneDependencyAssetEventArgs.UserData = e.UserData; return(loadSceneDependencyAssetEventArgs); }