public UIModule() { var configUiBridge = AppEngine.GetConfig("KEngine.UI", "UIModuleBridge"); if (!string.IsNullOrEmpty(configUiBridge)) { var uiBridgeTypeName = string.Format("{0}", configUiBridge); var uiBridgeType = KTool.FindType(uiBridgeTypeName); if (uiBridgeType != null) { UiBridge = Activator.CreateInstance(uiBridgeType) as IUIBridge; Log.Debug("Use UI Bridge: {0}", uiBridgeType); } else { Log.Error("Cannot find UIBridge Type: {0}", uiBridgeTypeName); } } if (UiBridge == null) { UiBridge = new UGUIBridge(); } UiBridge.InitBridge(); }
public IEnumerator Init() { var configUiBridge = AppEngine.GetConfig("UIModuleBridge"); if (!string.IsNullOrEmpty(configUiBridge)) { var uiBridgeTypeName = string.Format("{0}", configUiBridge); var uiBridgeType = Type.GetType(uiBridgeTypeName); if (uiBridgeType != null) { UiBridge = Activator.CreateInstance(uiBridgeType) as IUIBridge; Logger.Debug("Use UI Bridge: {0}", uiBridgeType); } else { Logger.LogError("Cannot find UIBridge Type: {0}", uiBridgeTypeName); } } if (UiBridge == null) { UiBridge = new UGUIBridge(); } UiBridge.InitBridge(); yield break; }