Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Bug / Crash  Error when installing the latest
#2
(12-05-2023, 07:34 PM)AdamZ101 Wrote: Im using Unity 2022.2.19 HDRP, and I'm getting this error in your scripts:

Assets\Obi\Scripts\Common\Backends\Burst\DataStructures\NativeMultilevelGrid.cs(34,13): error CS0305: Using the generic type 'UnsafeList<T>' requires 1 type arguments

Assets\Obi\Scripts\Common\Backends\Burst\DataStructures\NativeMultilevelGrid.cs(88,36): error CS8377: The type 'NativeMultilevelGrid<T>.Cell<T>' 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>'

Please advise. Thanks.

No error in Unity 2021.3.25f1 LTS URP.

Hi,

This is because the latest version of the Collections package has different requirements for generic types, there's a relatively simple workaround: Change the definition of Cell<K> in NativeMultiLevelGrid.cs to look like this:

public struct Cell<K> where K : unmanaged, IEquatable<K>

Also, change UnsafeList to UnsafeList<K>, in the same file.

let me know if you need further help,

kind regards
Reply


Messages In This Thread
Error when installing the latest - by AdamZ101 - 12-05-2023, 07:34 PM
RE: Error when installing the latest - by josemendez - 15-05-2023, 09:49 AM