Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

Getting error CS0702: Constraint cannot be special class 'Enum'

Discussion in 'Project Tiny' started by rakibs, Dec 8, 2018.

  1. rakibs

    rakibs

    Joined:
    Mar 6, 2015
    Posts:
    2
    Hello I am getting 3 error while using the Tiny Mode on Unity 18.3.0f1. I followed this process https://docs.unity3d.com/Packages/com.unity.tiny@0.13/manual/installing-tiny.html

    Code (CSharp):
    1. Library\PackageCache\com.unity.tiny@0.13.2-preview\Runtime\Runtime\Utility\EnumExtensions.cs(41,22): error CS1929: 'TEnum' does not contain a definition for 'HasFlag' and the best extension method overload 'EnumExtensions.HasFlag(Enum, Enum)' requires a receiver of type 'Enum'
    2.  
    3. Library\PackageCache\com.unity.tiny@0.13.2-preview\Runtime\Runtime\Utility\EnumExtensions.cs(66,27): error CS0702: Constraint cannot be special class 'Enum'
    4.  
    5. Library\PackageCache\com.unity.tiny@0.13.2-preview\Runtime\Runtime\Utility\EnumExtensions.cs(35,27): error CS0702: Constraint cannot be special class 'Enum'
     
  2. etienne_unity

    etienne_unity

    Unity Technologies

    Joined:
    Aug 31, 2017
    Posts:
    54
    Hi @rakibs

    You should be able to install Tiny Mode using 2018.3.0f1 within a new project: the default project settings are compatible with Tiny.

    The errors you're seeing are related to the current Scripting Runtime Version (.Net 4.x Equivalent is required) and Api compatibility level (either .NET 4.x or .NET Standard 2.0 are supported).
     
  3. rakibs

    rakibs

    Joined:
    Mar 6, 2015
    Posts:
    2
    Thanks. I had to create another project and this time there was no error