Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Bug / Crash  Error when installing the latest
#3
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

Assets/Obi/Scripts/Common/Backends/Burst/DataStructures/NativeMultilevelGrid.cs(72,29): error CS1929: 'UnsafeList<K>' does not contain a definition for 'IndexOf' and the best extension method overload 'MemoryExtensions.IndexOf<K>(ReadOnlySpan<K>, ReadOnlySpan<K>)' requires a receiver of type 'ReadOnlySpan<K>'

Assets/Obi/Scripts/Common/Backends/Burst/DataStructures/NativeMultilevelGrid.cs(75,21): error CS1929: 'UnsafeList<K>' does not contain a definition for 'RemoveAtSwapBack' and the best extension method overload 'ListExtensions.RemoveAtSwapBack<K>(List<K>, int)' requires a receiver of type 'List<K>'

(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'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

Assets/Obi/Scripts/Common/Backends/Burst/DataStructures/NativeMultilevelGrid.cs(72,29): error CS1929: 'UnsafeList<K>' does not contain a definition for 'IndexOf' and the best extension method overload 'MemoryExtensions.IndexOf<K>(ReadOnlySpan<K>, ReadOnlySpan<K>)' requires a receiver of type 'ReadOnlySpan<K>'

Assets/Obi/Scripts/Common/Backends/Burst/DataStructures/NativeMultilevelGrid.cs(75,21): error CS1929: 'UnsafeList<K>' does not contain a definition for 'RemoveAtSwapBack' and the best extension method overload 'ListExtensions.RemoveAtSwapBack<K>(List<K>, int)' requires a receiver of type 'List<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.
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 Ryle Cook - 12-06-2023, 01:27 AM