private void EditModule()
        {
            HTFrameworkModule module       = _settingItems[_currentItem].GetType().GetCustomAttribute <InternalSettingItemAttribute>().Module;
            GameObject        moduleEntity = null;

            switch (module)
            {
            case HTFrameworkModule.Main:
                moduleEntity = GameObject.Find("HTFramework");
                break;

            case HTFrameworkModule.WebRequest:
                moduleEntity = GameObject.Find("HTFramework/WebRequest");
                break;
            }

            if (moduleEntity)
            {
                Selection.activeGameObject = moduleEntity;
                EditorGUIUtility.PingObject(moduleEntity);
            }
            else
            {
                Log.Warning("未找到该设置项相关联的模块!");
            }
        }
Exemplo n.º 2
0
        private void EditModule()
        {
            HTFrameworkModule module       = _settingItems[_currentItem].GetType().GetCustomAttribute <InternalSettingItemAttribute>().Module;
            GameObject        moduleEntity = null;

            switch (module)
            {
            case HTFrameworkModule.AspectTrack:
                moduleEntity = GameObject.Find("HTFramework/AspectTrack");
                break;

            case HTFrameworkModule.Audio:
                moduleEntity = GameObject.Find("HTFramework/Audio");
                break;

            case HTFrameworkModule.Controller:
                moduleEntity = GameObject.Find("HTFramework/Controller");
                break;

            case HTFrameworkModule.WebRequest:
                moduleEntity = GameObject.Find("HTFramework/WebRequest");
                break;
            }

            if (moduleEntity)
            {
                Selection.activeGameObject = moduleEntity;
                EditorGUIUtility.PingObject(moduleEntity);
            }
            else
            {
                GlobalTools.LogWarning("未找到该设置项相关联的模块!");
            }
        }
Exemplo n.º 3
0
 /// <summary>
 /// 获取内置模块
 /// </summary>
 /// <param name="moduleName">内置模块名称</param>
 /// <returns>内置模块对象</returns>
 public InternalModuleBase GetInternalModule(HTFrameworkModule moduleName)
 {
     if (_internalModules.ContainsKey(moduleName))
     {
         return(_internalModules[moduleName]);
     }
     else
     {
         throw new HTFrameworkException(HTFrameworkModule.Main, "获取内置模块失败:不存在名为 " + moduleName.ToString() + " 的内置模块!");
     }
 }
Exemplo n.º 4
0
 public InternalModuleAttribute(HTFrameworkModule moduleName)
 {
     ModuleName = moduleName;
 }
 public InternalSettingItemAttribute(HTFrameworkModule module)
 {
     Module = module;
 }
Exemplo n.º 6
0
 /// <summary>
 /// HTFramework框架异常
 /// </summary>
 /// <param name="module">异常发起的模块</param>
 /// <param name="message">异常信息</param>
 public HTFrameworkException(HTFrameworkModule module, string message) : base("[" + module.ToString() + "]" + message)
 {
     Module = module;
 }