コード例 #1
0
 void LoadAssetFail(string assetName, LoadResourceStatus status, string errorMessage, object userData)
 {
     if (m_EventManager != null)
     {
         string appendErrorMessage = Utility.Text.Format("Load UI form failure, asset name '{0}', status '{1}', error message '{2}'.", assetName, status.ToString(), errorMessage);
         m_EventManager.Fire(this, OpenUIFormFailureEventArgs.Create(assetName, appendErrorMessage, userData));
     }
 }
コード例 #2
0
        /// <summary>
        /// 创建打开界面失败事件。
        /// </summary>
        /// <param name="uiFormAssetName">界面资源名称。</param>
        /// <param name="errorMessage">错误信息。</param>
        /// <param name="userData">用户自定义数据。</param>
        /// <returns>创建的打开界面失败事件。</returns>
        public static OpenUIFormFailureEventArgs Create(string uiFormAssetName, string errorMessage, object userData)
        {
            OpenUIFormFailureEventArgs openUIFormFailureEventArgs = ReferencePool.Acquire <OpenUIFormFailureEventArgs>();

            openUIFormFailureEventArgs.UIFormAssetName = uiFormAssetName;
            openUIFormFailureEventArgs.ErrorMessage    = errorMessage;
            openUIFormFailureEventArgs.UserData        = userData;
            return(openUIFormFailureEventArgs);
        }