![]() |
Bug / Crash Error when installing the latest - Printable Version +- Obi Official Forum (https://obi.virtualmethodstudio.com/forum) +-- Forum: Obi Users Category (https://obi.virtualmethodstudio.com/forum/forum-1.html) +--- Forum: Obi Cloth (https://obi.virtualmethodstudio.com/forum/forum-2.html) +--- Thread: Bug / Crash Error when installing the latest (/thread-3868.html) |
Error when installing the latest - AdamZ101 - 12-05-2023 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. RE: Error when installing the latest - josemendez - 15-05-2023 (12-05-2023, 07:34 PM)AdamZ101 Wrote: Im using Unity 2022.2.19 HDRP, and I'm getting this error in your scripts: 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 RE: Error when installing the latest - Ryle Cook - 12-06-2023 Hi, I still got errors after modifying the code to what you've mentioned above. unmanaged is already inherited, just added UnsafeList<K>. I'm using Unity LTS 2022.3.1f1, Collections 2.1.4. Code: Assets/Obi/Scripts/Common/Backends/Burst/DataStructures/NativeMultilevelGrid.cs(39,32): error CS1729: 'UnsafeList<K>' does not contain a constructor that takes 1 arguments (12-06-2023, 01:27 AM)Ryle Cook Wrote: Hi, I still got errors after modifying the code to what you've mentioned above. unmanaged is already inherited, just added UnsafeList<K>. I found the same(or similar?) issue, and fixed the first error. To fix the last two errors I deleted <K> type to make compiler deduct automatically, but I'm not sure that is the right way. Anyway I tested a few samples and it works. |