10using System.Collections;
11using System.Collections.Generic;
37 refreshImplementingTypes();
43 public void DrawProperty(Rect rect, SerializedProperty property, GUIContent label) {
44 int curSelectedIdx = getCurSelectedIdx(property);
46 int selectedIdx = EditorGUI.Popup(rect, label, curSelectedIdx,
_typeOptions);
47 if (selectedIdx != curSelectedIdx) {
57 private void refreshImplementingTypes() {
60 foreach (var assembly
in AppDomain.CurrentDomain.GetAssemblies()) {
61 foreach (var type
in assembly.GetTypes()) {
62 if (
_baseType.IsAssignableFrom(type) && !type.IsAbstract && !type.IsInterface) {
69 private void refreshTypeOptions() {
77 private int getCurSelectedIdx(SerializedProperty property) {
Place this attribute on a serialized string field to have it render as a dropdown menu that is automa...
ImplementsTypeNameDropdownAttribute(Type type)
List< Type > _implementingTypes
GUIContent[] _typeOptions