/// <summary>
        /// 游戏框架组件初始化。
        /// </summary>
        protected override void Awake()
        {
            base.Awake();

            m_SettingManager = GameFrameworkEntry.GetModule <ISettingManager>();
            if (m_SettingManager == null)
            {
                Log.Fatal("Setting manager is invalid.");
                return;
            }

            SettingHelperBase settingHelper = Helper.CreateHelper(m_SettingHelperTypeName, m_CustomSettingHelper);

            if (settingHelper == null)
            {
                Log.Error("Can not create setting helper.");
                return;
            }

            settingHelper.name = string.Format("Setting Helper");
            Transform transform = settingHelper.transform;

            transform.SetParent(this.transform);
            transform.localScale = Vector3.one;

            m_SettingManager.SetSettingHelper(settingHelper);
        }
Exemple #2
0
        private void xxx()
        {
            SettingHelperBase settingHelper = Helper.CreateHelper(m_SettingHelperTypeName, m_CustomSettingHelper);

            if (settingHelper == null)
            {
                Log.Error("Can not create setting helper.");
                return;
            }

            settingHelper.name = string.Format("Setting Helper");
            Transform transform = settingHelper.transform;

            transform.SetParent(this.transform);
            transform.localScale = Vector3.one;
            m_SettingManager.SetSettingHelper(settingHelper);
        }
Exemple #3
0
        /// <summary>
        /// 游戏框架组件初始化。
        /// </summary>
        protected internal override void Awake()
        {
            base.Awake();

            m_SettingManager = GameFrameworkEntry.GetModule <ISettingManager>();
            if (m_SettingManager == null)
            {
                Log.Fatal("Setting manager is invalid.");
                return;
            }

            if (m_SettingHelper == null)
            {
                m_SettingHelper      = (new GameObject()).AddComponent <DefaultSettingHelper>();
                m_SettingHelper.name = string.Format("Setting Helper");
                Transform transform = m_SettingHelper.transform;
                transform.SetParent(this.transform);
                transform.localScale = Vector3.one;
            }

            m_SettingManager.SetSettingHelper(m_SettingHelper);
        }