private void OnAddDropdown(Rect buttonRect, ReorderableList list) { var subtypes = QuestEditorUtility.GetSubtypes <QuestAction>(); var menu = new GenericMenu(); for (int i = 0; i < subtypes.Count; i++) { var subtype = subtypes[i]; menu.AddItem(new GUIContent(ObjectNames.NicifyVariableName(subtype.Name)), false, OnAddQuestActionType, subtype); } menu.ShowAsContext(); }
private void OnRewardSystemListAddDropdown(Rect buttonRect, ReorderableList list) { var menu = new GenericMenu(); menu.AddItem(new GUIContent("Refresh From Components"), false, OnRefreshRewardSystemList); menu.AddSeparator(string.Empty); var subtypes = QuestEditorUtility.GetSubtypes <RewardSystem>(); for (int i = 0; i < subtypes.Count; i++) { var subtype = subtypes[i]; menu.AddItem(new GUIContent(ObjectNames.NicifyVariableName(subtype.Name)), false, OnAddRewardSystemType, subtype); } menu.ShowAsContext(); }