-
-
Notifications
You must be signed in to change notification settings - Fork 432
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
How to setup MagicOnion Unity for using Grpc.Net.Client; #501
Comments
Sorry for the confusing documentation. Currently on Unity you need to use C-core gRPC library. |
Nope I found this in code: and some I done it today my client can connect to MagicOnion Server through Grpc.Net.Client; |
Is this part you're asking for? |
Hi, @binhnguyen86 |
Sorry for the confusion. |
This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 7 days. |
I am working on the concept for the future project with Unity + .NET. I was going to use RPC, and MagicOnion seems an excellent option. I actively use your MsgPack and UniTask libs in my projects, and I love them. Not a single complaint for several years. But regarding this lib (usage for Unity) ,I expect some serious issues to come up. Even though gRPC extended Grpc.Core support for one year - the core component of MagicOnion for Unity seems to be deprecated. (alt url https://grpc.io/blog/grpc-csharp-future/). This lib - grpc-dotnet might seem as alternative. But the author clearly stated there would be no steps further to support Unity: grpc/grpc-dotnet#1309 (comment) And it seems to me that it might require significant efforts to make Unity and Grpc.Net.Client work together. It would require a fork of grpc-dotnet that works on a custom HTTP/2 client, which also works in Unity. So my question is: Do you have an envisioning of how the problem can be resolved for MagicOnion and Unity? P.S. I have some controversial thoughts regarding Grpc.Core deprecation. They state in the article that it is widely used even by Google. So perhaps some option might appear. But on the other hand, EOF was supposed to take a place in May 2022, and nothing has changed since now :) I just wanted to know your opinion before making a decision. |
You can use this with MagicOnion and Unity to skip over needing a native gRPC client at all. It uses |
@mwegner I feel lack of details in the doc about how exactly does it work:
It seems to me that the lib is under active development right now - do you think it is a production-ready? |
I switched an in-development project to use it, in order to get rid of the native plugin requirement. Stability seems fine! It's actually a little more robust when it comes to connection drops, at least from the POV of the server. I imagine it needs some of the Grpc libraries for their types more than anything functional, but I don't know offhand. I used an unmodified library, including iOS builds. One big reason I tried this bridge out as soon as it was available was that this project will eventually ship on consoles, and I wasn't looking forward to building our own gRPC native plugins there--and now we don't have to. (Thanks, Cysharp folks!) Which version of Unity provides a It wasn't hard or time consuming to swap this project from MagicOnion over native gRPC plugin to MagicOnion over this websocket bridge (I think it was <1hr of work, but I did it awhile ago). I'd recommend poking around a toy project implementation yourself to see if it meets your needs! |
Since gRPC for .NET (C-core) development has been discontinued, we are also looking into ways to use grpc-dotnet (Grpc.Net.Client) in Unity apps. One option is waiting for Unity runtime upgrade to .NET 6/7 (or later) so that we can use grpc-dotnet without modification, but this may take some time. WebSocket bridging certainly works, but its primary target is the WebGL platform and environments that require native-independence. |
This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 7 days. |
@mayuki I am also looking into using http2 transport for grpc as I would like to avoid wrapping the transport in something else again. I also have little confidence Unity will ship .NET 6/7 anytime soon. As for your PoC, is this work available somewhere to look into / check out? |
This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 30 days. |
I read the document, and saw that MagicOnion client on unity can use Grpc.Net.Client;
But I don't find any document showing how to do that. Does anyone know how?
The text was updated successfully, but these errors were encountered: