Question: Cheers!
I had a two enums, describing my entityes: Players and guns types:

```
public enum PlayersType {
    Scout,
    Tank
}

public enum GunsType {
    Machinegun,
    Tesla
}

```

I had a generic a struct generic class, and 2 realizations of it:

```
public class EntityType<T> where T: struct, IConvertible {
    public GameObjectType ObjectType;
}

public class PlayerEntity: EntityType<PlayersType> { }

public class TowerEntity: EntityType<GunsType> { }

```

And i want to create class, who has EntityType field and inherite ScriptableObject class.

I did this:

```
public class ObjectTypeConfig: ScriptableObject
{
    public EntityType<Enum> EntityType;
}

```

But its return error: 

> 
> The type 'System.Enum' must be a non-nullable value type in order to use it as type parameter `T' in the generic type or method.
> 
> 
> 

Does anyone know how can i create necessary field? 
As a result i'm want to create Class, who will be has a Array of ObjectTypeConfigs, containing Players and Towers Entitiyes.

Answer: 
You declared the property as `EntityType<Enum>` but `EntityType` has the generic constraint of `EntityType<T> where T : struct`.

The [`struct` constraint](https://learn.microsoft.com/en-us/dotnet/csharp/programming-guide/generics/constraints-on-type-parameters) means:

> 
> The type argument must be a value type. Any value type except Nullable can be specified
> 
> 
> 

If You check `Enum` you see it **is a class** - and therefore can be assigned `null` and fails the generic constraints specified.

I suspect you want one of two:

1. Change property to be `EntityType<GunsType>` or `EntityType<PlayersType>`
2. Make the `ObjectTypeConfig` class generic too with the same constraints and then `EntityType<T> EntityType`
```
public class ObjectTypeConfig<T>: ScriptableObject where T: struct, IConvertible
{
    public EntityType<T> EntityType;
}

```