示例#1
0
        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);
            }
        }
示例#2
0
 /// <summary>
 /// 必要なら override する
 /// </summary>
 public virtual void DrawEditor(ModuleControlAbstract module, UnityEditor.SerializedProperty property)
 {
 }
示例#3
0
 public void SetUp(ModuleControlAbstract owner)
 {
     _owner = owner;
     Prepare();
 }