コード例 #1
0
        private void LoadFont(string fontName)
        {
            m_LoadedFlag.Add(Utility.Text.Format("Font.{0}", fontName), false);
            GameEntry.Resource.LoadAsset(AssetUtility.GetFontAsset(fontName), Constant.AssetPriority.FontAsset, new LoadAssetCallbacks(
                                             (assetName, asset, duration, userData) =>
            {
                m_LoadedFlag[Utility.Text.Format("Font.{0}", fontName)] = true;
                UGUIForm.SetMainFont((Font)asset);
                Log.Info("Load font '{0}' OK.", fontName);
            },

                                             (assetName, status, errorMessage, userData) =>
            {
                Log.Error("Can not load font '{0}' from '{1}' with error message '{2}'.", fontName, assetName, errorMessage);
            }));
        }
コード例 #2
0
 public static void CloseUIForm(this UIComponent uiComponent, UGUIForm uiForm)
 {
     uiComponent.CloseUIForm(uiForm.UIForm);
 }