BITKit/Src/Unity/BitMask/ScriptableImplements.cs

21 lines
577 B
C#

using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace Net.BITKit.BitMask
{
public abstract class ScriptableImplements : ScriptableObject
{
public abstract Type[] Types { get; }
public abstract Type Type { get; }
}
public class ScriptableImplements<T> : ScriptableImplements
{
[SerializeReference,SubclassSelector] private T[] implements;
public override Type[] Types => Array.ConvertAll(implements, x => x.GetType());
public override Type Type => typeof(T);
}
}