示例#1
0
        private void OnEnable()
        {
            Predicate <Type> test = UTType.Test_Or(
                UTType.ETypeTest.ABSTRACT,
                UTType.ETypeTest.ANONYMOUS,
                UTType.ETypeTest.GENERIC,
                UTType.ETypeTest.SEALED
                );


            _list = new EETypeList(new Assembly[] { typeof(int).Assembly, typeof(UTArray).Assembly, typeof(AppManager).Assembly }, 2, test);
        }
示例#2
0
        private void OnEnable()
        {
            Predicate <Type> test = UTType.Test_Or(
                UTType.ETypeTest.ABSTRACT,
                UTType.ETypeTest.ANONYMOUS,
                UTType.ETypeTest.GENERIC,
                UTType.ETypeTest.SEALED
                );

            _button = new EESaveFileButton(
                new SLabel()
            {
                Id = "save", ReadableName = "Save The File", ToolTip = "This saves the file"
            }
                );

            _button.OnPathChosen += s => _pathChosen = s;
        }
示例#3
0
        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);
            }
        }