Search Unity

Compilation error when installing Transport Package

Discussion in 'NetCode for ECS' started by MintTree117, Dec 5, 2021.

  1. MintTree117

    MintTree117

    Joined:
    Dec 2, 2018
    Posts:
    340
    The error:

    Library\PackageCache\com.unity.jobs@0.8.0-preview.23\Unity.Jobs\IJobParallelForDefer.cs(77,85): error CS8377: The type 'U' must be a non-nullable value type, along with all fields at any level of nesting, in order to use it as parameter 'T' in the generic type or method 'NativeList<T>

    I receive this when I install transport, netcode, or netcode for gameobjects. I am on Unity 2020.3.24f1, and also occurs on 2020.3.19f1. I have entities, jobs, burst, collections installed.
     
  2. timjohansson

    timjohansson

    Unity Technologies

    Joined:
    Jul 13, 2016
    Posts:
    473
    This looks like a version mismatch between com.unity.jobs and com.unity.collections. Latest version of transport pulls in a newer version of collections, but I don't think transport needs com.unity.jobs, and I am pretty sure netcode 0.6 is not compatible with latest transport.
    If you are using netcode for entities you should use the transport version it depends on, not try to upgrade it.
    If you are just using transport and want the latest version you should not use com.unity.jobs (or entities)
     
    Opeth001 and MintTree117 like this.