private void OnEnable() { _sb = new StringBuilder(); _aes = new AesManaged(); _saveFileButton = new EESaveFileButton( new SLabel() { Id = "save-key-provider", ReadableName = "Save KeyProvider", ToolTip = "Click to choose a path to save the genrated key provider" } ); _saveFileButton.OnPathChosen += GenerateKeyProvider; _fileName = new EECustomString( new SLabel() { Id = "filename", ReadableName = "FileName", ToolTip = "This is the name of the generated KeyProviderAesSource" }, () => $"{_namespace.Split('.')[0]}KeyProviderAesSource" ); }
private void Initialize() { _selectedTypeList = new EETypeList( AppDomain.CurrentDomain.GetAssemblies(), 1, UTType.Test_Or( UTType.ETypeTest.CLASS, UTType.ETypeTest.ENUM, UTType.ETypeTest.INTERFACE, UTType.ETypeTest.TOBIAS_VALUE_TYPE, UTType.ETypeTest.STRUCT ) ); _namespace = new EECustomString( new SLabel() { ReadableName = "Namespace", ToolTip = "Namespace to use" }, () => _selectedTypeList.SelectedType?.Namespace ); _menuPath = new EECustomString( new SLabel() { ReadableName = "Menu Name", ToolTip = "Prefix in front of menu paths (Component and Asset). If this = MENU, then asset path is MENU/Events/EventName" }, () => string.IsNullOrEmpty(_namespace?.String) ? "Unknown" : _namespace.String.Split('.')[0] + (_namespace.String.Split('.').Length < 2 ? "" : $"/{_namespace.String.Split('.')[1]}") ); if (_lastSavePath == null) { _lastSavePath = new PathString(Application.dataPath); } }