autocore-ai / MapToolbox

Plugins to make Autoware vector maps in Unity
GNU Lesser General Public License v3.0
257 stars 101 forks source link

The type name 'ReadOnly' does not exist in the type 'NativeArray<T> #86

Open longzuyan opened 2 years ago

longzuyan commented 2 years ago

Hi,

OS version: Windows 10 Unity version: Unity 2019.4.40f1

when I added package from disk,below error is getting: Library\PackageCache\com.unity.collections@0.15.0-preview.21\Unity.Collections\NativeList.cs(716,31): error CS0426: The type name 'ReadOnly' does not exist in the type 'NativeArray<T>'

BoysFight commented 1 year ago

+1. Have you solved the problem?

hir-yk commented 1 year ago

@longzuyan
Have you solved this problem? Now I facing same problem. if you solved, could you tell me how to solve it. thank you.

longzuyan commented 1 year ago

@longzuyan Have you solved this problem? Now I facing same problem. if you solved, could you tell me how to solve it. thank you.

I haven't solved this problem yet.

climb0081 commented 1 year ago

+1 me too

LadissonLai commented 1 year ago

i have solved this problem by change the git branch to lanelet2. enjoy!!!

Acoustic6 commented 1 year ago

NativeArray is a struct which has ReadOnly property added only in 2022 Unity versions. So you need to upgrade your Unity. In collections collections 0.15.0-preview.21 package.json file there unity version is specified like "unity": "2020.1".

I handled this issue installing 0.9.0-preview.6 collections verions for 2019.3 Unity version but new error appear corresponding to NativeParallelMultiHashMap. So I installed collections 2.1.0-exp.4 version and Unity 2022.2.