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

Google.Protobuf dependancy #17

Open
YasiWonb opened this issue Sep 14, 2023 · 6 comments
Open

Google.Protobuf dependancy #17

YasiWonb opened this issue Sep 14, 2023 · 6 comments

Comments

@YasiWonb
Copy link

Hello,
I think there is a dependancy on Google.Protobuf nuget package which is not mentioned.

@DeepP2667
Copy link

Also wondering about this, should this be added to the dependencies package?

@mayuki
Copy link
Member

mayuki commented Nov 8, 2023

Google.Protobuf is not essential but it is indeed the de facto standard.
I also thought about building a redistribution package, but if I install that package from UnityNuGet, the following error occurs.

Assembly 'Packages/org.nuget.google.protobuf/Google.Protobuf.dll' will not be loaded due to errors:
Google.Protobuf references strong named System.Runtime.CompilerServices.Unsafe Assembly references: 4.0.4.1 Found in project: 6.0.0.0.
Assembly Version Validation can be disabled in Player Settings "Assembly Version Validation"

According to the error message, you can use it if you change the Player Settings, but it's difficult to judge whether it's good to distribute something that causes an error.

@Cova8bitdots
Copy link

Assembly 'Packages/org.nuget.google.protobuf/Google.Protobuf.dll' will not be loaded due to errors:
Google.Protobuf references strong named System.Runtime.CompilerServices.Unsafe Assembly references: 4.0.4.1 Found in project: 6.0.0.0.
Assembly Version Validation can be disabled in Player Settings "Assembly Version Validation"

This error is happened from v1.0.0.
This version of SDK refers System.Runtime.CompilerServices.Unsafe 6.0.0
https://github.com/Cysharp/YetAnotherHttpHandler/releases/tag/redist-20240111-01

On the other hand, there is no error message with v0.1.0 which refers System.Runtime.CompilerServices.Unsafe 4.5.3.
https://github.com/Cysharp/YetAnotherHttpHandler/releases/tag/redist-20230728-01

The latest version of Google.Protobuf refers System.Runtime.CompilerServices.Unsafe 4.5.2 or above , however unity alerts error message if some SDKs refer different major version of System.Runtime.CompilerServices.Unsafe.
https://www.nuget.org/packages/Google.Protobuf/#dependencies-body-tab

Is it possible to downgrade version of System.Runtime.CompilerServices.Unsafe which is refered by YetAnotherHttpHandler?

(cf, even if we change Script Backend or Api Compatibility Level in Player Settings, the error is not fixed.)

@mayuki
Copy link
Member

mayuki commented Feb 1, 2024

In my environment (Unity 2021.3.22f1), the error does not occur with a combination of System.Runtime.CompilerServices.Unsafe 6.0.0 and Google.Protobuf 3.25.2. Could you please tell me your version?

@Cova8bitdots
Copy link

Cova8bitdots commented Feb 1, 2024

@mayuki

Could you please tell me your version?

The error occurs with Unity 2021.3.16f1.
However, the error does not occur with latest Unity LTS version (Unity2022.3.18f1 ).

So it seems that there is minimum support version of Unity between 2021.3.16f1 and 2021.3.22f1.

I apologize taking your time.

@AntonPetrov83
Copy link

As I understand Google.Protobuf is required by gRPC client library, at least it was like this for me.
For Unity 2022.3.41 everything compiled after I copied Google.Protobuf.dll netstandard2.0 from the official nuget package.

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

No branches or pull requests

5 participants