Error: The type 'OriginalNameAttribute' exists in both 'Google.Protobuf" and 'Google.Protobuf_Packed'

Hi Unity Team,

Thanks again for creating this wonderful plug in!
I am having problem using Sentis in one of my existing project. Once I import Sentis from the package manager, I got the following error:

Library/PackageCache/com.unity.sentis@1.2.0-exp.2/Runtime/ONNX/Generated/Onnx.cs(2945,15): error CS0433: The type 'OriginalNameAttribute' exists in both 'Google.Protobuf, Version=3.20.0.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604' and 'Google.Protobuf_Packed, Version=3.21.12.0, Culture=neutral, PublicKeyToken=null'

There are also many others related to different files under /Runtime/ONNX and ended with similar error message (e.g., xx exists in both Google Protobuf and Google Protobuf_Packed). I guess this might because of I am using another plugin (MediaPipeUnity) which runs hand detection models as well.

Would there be any suggestions on how I could fix this so that I can use both plugins at the same time? Any suggestions are appreciated. Thanks!

Thanks for pointing this out, you are correct that the issue is these two packages not playing nice together. I think I have a fix that should make it into an upcoming release.

This is known internally as issue 173

1 Like

Fix landed in 1.2.0-exp.2

has it been fixed?

I still get the issue in the linked package

Yes, download the latest version it’s fixed

A small hint for those who still having troubles with the latest version: The error will still be there if you are using old versions of Unity (e.g., 2022.3). Changing it to 2023.2 would solve the problem

1 Like