コード例 #1
0
ファイル: UIGenerator.cs プロジェクト: grashaar/uiman
 public void OnSelecType(string typeName)
 {
     _config.selectedType  = typeName;
     _selectedType         = UIManEditorReflection.GetTypeByName(typeName);
     _selectedTypeIsSealed = _selectedType.IsSealed;
     _selectedProperties   = _selectedType.GetUIManProperties(true);
     this.namespaceField   = new TextFieldHelper(_selectedType.Namespace);
     this.baseTypePopup    = new EditablePopup(_arrSupportType, _selectedType.BaseType.Name, OnChangeBaseType);
     _currentScriptPath    = UIManCodeGenerator.GetScriptPathByType(_selectedType);
     _handlerScriptPath    = UIManCodeGenerator.GeneratPathWithSubfix(_currentScriptPath, ".Handler.cs");
     CachePropertiesDrawer();
 }
コード例 #2
0
 private void Initialize()
 {
     if (!this.inited)
     {
         if (this.baseTypePopup == null)
         {
             var config = EditorHelper.GetOrCreateScriptableObject <UIManConfig>();
             this.namespaceField = new TextFieldHelper(config.classNamespace);
             this.baseTypePopup  = new EditablePopup(this.arrSupportType, config.name, null);
         }
         this.minSize = new Vector2(300, 160);
         this.maxSize = this.minSize;
         this.inited  = true;
     }
 }