You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been working with MagicOnion in Unity for a while, and I recently updated my project setup to move off of the deprecated version of gRPC. However, I am now seeing the following compiler errors related to source generation. Note that all three errors are identical apart from the line numbers.
Project Setup
The following packages are installed via the Unity package manager:
MagicOnion v6.1.2
YetAnotherHttpHandler v1.2.1
NuGetForUnity v4.1.0
The following packages are installed via NuGetForUnity:
MessagePack v2.5.140
Grpc.Net.Client v2.62.0
System.IO.Pipelines v8.0.0
I am running this on an Apple Silicon Mac.
In player settings, the scripting backend is set to IL2CPP and the api compatibility level is set to .NET Framework.
I have the source generator setup using MagicOnionClientGenerationAttribute. This file, as well as all of my other code, is contained within its own asmdef. As I understand it, this source generation takes the place of moc, but MessagePack still requires its own manual generation step using mpc. The error above is shown regardless of whether the file generated with mpc exists.
I should also mention that the shared service interfaces are stored in the server directory outside of the Unity project, and then the Unity project symlinks to them.
The text was updated successfully, but these errors were encountered:
Turns out the issue was that I was missing a reference to MagicOnion.Serialization.MessagePack in the asmdef that contained my code. Closing this as resolved!
The Problem
I've been working with MagicOnion in Unity for a while, and I recently updated my project setup to move off of the deprecated version of gRPC. However, I am now seeing the following compiler errors related to source generation. Note that all three errors are identical apart from the line numbers.
Project Setup
The following packages are installed via the Unity package manager:
The following packages are installed via NuGetForUnity:
I am running this on an Apple Silicon Mac.
In player settings, the scripting backend is set to IL2CPP and the api compatibility level is set to .NET Framework.
I have the source generator setup using
MagicOnionClientGenerationAttribute
. This file, as well as all of my other code, is contained within its own asmdef. As I understand it, this source generation takes the place ofmoc
, but MessagePack still requires its own manual generation step usingmpc
. The error above is shown regardless of whether the file generated withmpc
exists.I should also mention that the shared service interfaces are stored in the server directory outside of the Unity project, and then the Unity project symlinks to them.
The text was updated successfully, but these errors were encountered: