/// <summary> /// 创建加载场景失败事件。 /// </summary> /// <param name="sceneAssetName">场景资源名称。</param> /// <param name="errorMessage">错误信息。</param> /// <param name="userData">用户自定义数据。</param> /// <returns>创建的加载场景失败事件。</returns> public static InnerLoadSceneFailureEventArgs Create(string sceneAssetName, string errorMessage, object userData) { InnerLoadSceneFailureEventArgs loadSceneFailureEventArgs = ReferencePool.Acquire <InnerLoadSceneFailureEventArgs>(); loadSceneFailureEventArgs.SceneAssetName = sceneAssetName; loadSceneFailureEventArgs.ErrorMessage = errorMessage; loadSceneFailureEventArgs.UserData = userData; return(loadSceneFailureEventArgs); }
private void OnLoadSceneFailure(object sender, InnerLoadSceneFailureEventArgs e) { Log.Warning("Load scene failure, scene asset name '{0}', error message '{1}'.", e.SceneAssetName, e.ErrorMessage); EventComponent.This.Fire(this, OuterLoadSceneFailureEventArgs.Create(e)); }