예제 #1
0
        private static TypeSelectInfo GetTypes()
        {
            if (_types == null)
            {
                _types = TypeFinder.GetDerivedTypes <Instruction>("Create/");
            }

            return(_types);
        }
예제 #2
0
        private void OnEnable()
        {
            InstructionBreadcrumbs.Reset();

            var instructions = _instructions.Setup(serializedObject.FindProperty("Instructions"), null, null, false, true, false, true, true, DrawInstruction, RemoveInstruction);

            instructions.onAddDropdownCallback += AddInstructionDropdown;

            _instructionTypes = TypeFinder.GetDerivedTypes <Instruction>("");

            foreach (var type in _instructionTypes.Types)
            {
                _addMenu.AddItem(new GUIContent(type.Name, "The type of instruction to create."), false, AddInstruction, type);
            }
        }