Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
longzuyan opened this issue Sep 23, 2022 · 6 comments
Open

Comments

@longzuyan
Copy link

Hi,

OS version: Windows 10
Unity version: Unity 2019.4.40f1

when I added package from disk,below error is getting:
Library\PackageCache\[email protected]\Unity.Collections\NativeList.cs(716,31): error CS0426: The type name 'ReadOnly' does not exist in the type 'NativeArray<T>'

@BoysFight
Copy link

+1. Have you solved the problem?

@hir-yk
Copy link

hir-yk commented Dec 19, 2022

@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
Copy link
Author

@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
Copy link

+1 me too

@LadissonLai
Copy link

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

@Acoustic6
Copy link

Acoustic6 commented Jul 4, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants