Why isn’t this supported in Unity?
public class Container<T>
{
private static class PerType<U> where U : T
{
public static U item;
}
public U Get<U>() where U : T
{
return PerType<U>.item;
}
public void Set<U>(U newItem) where U : T
{
PerType<U>.item = newItem;
}
}
I’m getting this error:
error CS0305: Using the generic type
Container.PerType’ requires2’
type argument(s)