/// <summary> /// 创建加载资源代理辅助器更新事件。 /// </summary> /// <param name="type">进度类型。</param> /// <param name="progress">进度。</param> /// <returns>创建的加载资源代理辅助器更新事件。</returns> public static LoadResourceAgentHelperUpdateEventArgs Create(LoadResourceProgress type, float progress) { LoadResourceAgentHelperUpdateEventArgs loadResourceAgentHelperUpdateEventArgs = ReferencePool.Acquire <LoadResourceAgentHelperUpdateEventArgs>(); loadResourceAgentHelperUpdateEventArgs.Type = type; loadResourceAgentHelperUpdateEventArgs.Progress = progress; return(loadResourceAgentHelperUpdateEventArgs); }
public override void OnLoadUpdate(LoadResourceAgent agent, LoadResourceProgress type, float progress) { base.OnLoadUpdate(agent, type, progress); if (type == LoadResourceProgress.LoadScene) { m_LoadSceneCallbacks.LoadSceneUpdateCallback?.Invoke(AssetName, progress, UserData); } }
public override void OnLoadUpdate(LoadResourceAgent agent, LoadResourceProgress type, float progress) { base.OnLoadUpdate(agent, type, progress); if (type == LoadResourceProgress.LoadAsset) { if (m_InstantiateAssetCallbacks.InstantiateAssetUpdateCallback != null) { m_InstantiateAssetCallbacks.InstantiateAssetUpdateCallback(AssetName, progress, UserData); } } }
public virtual void OnLoadAssetUpdate(LoadResourceAgent agent, LoadResourceProgress type, float progress) { }
public LoadResourceAgentHelperUpdateEventArgs(LoadResourceProgress type, float progress) { Type = type; Progress = progress; }
// // 摘要: // /// 初始化加载资源代理辅助器更新事件的新实例。 /// // // 参数: // type: // 进度类型。 // // progress: // 进度。 public LoadResourceUpdateEventArgs(LoadResourceProgress type, float progress) { Progress = progress; Type = type; }