protected void OnEnable() { _base = target as ModuleControlAbstract; var moduleType = _base.ModuleType() ?? typeof(T); // 必要タイプを取得 _types = AppDomain.CurrentDomain.GetAssemblies() .SelectMany(a => a.GetTypes()) .Where(t => !t.IsAbstract && t.IsSubclassOf(moduleType)) .ToArray(); _moduleProperty = serializedObject.FindProperty("_modules"); _componentInfos = new Dictionary <Type, TypeInfo>(); foreach (var type in _types) { var info = new TypeInfo(type, this); _componentInfos.Add(type, info); } }
/// <summary> /// 必要なら override する /// </summary> public virtual void DrawEditor(ModuleControlAbstract module, UnityEditor.SerializedProperty property) { }
public void SetUp(ModuleControlAbstract owner) { _owner = owner; Prepare(); }