public void GenerateHandler(string scriptPath) { var handlerScriptPath = UIManCodeGenerator.GeneratPathWithSubfix(scriptPath, ".Handler.cs"); var config = EditorHelper.GetOrCreateScriptableObject <UIManConfig>(false); var handlerCode = UIManCodeGenerator.GenerateHandler(this.typeName, this.baseType, config, this.namespaceField.Text); UIManCodeGenerator.SaveScript(handlerScriptPath, handlerCode, false, this.typeName, this.baseType); }
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(); }