Comments (17)
You're right.
I think that the gRPC project should be separeted, too.
However, MagicOnion is not stable and Unity requires library under specify foloder so importing by SubModule makes difficult to development.
I'm sorry, please use it gRPC client from MagicOnion, now.
But, I'll remove reference of MagicOnion from gRPC Client.
from magiconion.
So actually I managed to set it up against proto generated gRPC server with complex protobufs in requests and response.. 👍 Both unary and server streaming. I can explain how I did this briefly later.
from magiconion.
I totaly get you with submodules they are huge pain. One option I found for me that works much better than git submodules is git subtree http://blogs.atlassian.com/2013/05/alternatives-to-git-submodule-git-subtree/
It feels like you have single repo but you can still quite easy pull/push merges from other repo
from magiconion.
Our company was using Subtree for another project for a while,
but it stopped because there are many troubles.
A non-natural workflow brought about a lot of confusion.
from magiconion.
I see, yes it does require deep understanding of what git is and that is rare for many developers in gamedev industry.
Main reason for me to use just gRPC bit is as you said MagicOnion is in alpha state. So I am using directly DefaultCallInvoker
with Method<byte[], byte[]>
. In the long run it would make much more sense to use whole MagicOnion because gRPC without typed client generation is not really gRPC but just an http/2 library and thats what MagicOnion brings ultimately - statically typed clients
P.S The only place that leaks MagicOnion into gRPC is in RpcException
atm
from magiconion.
Def interested in this as well. Going to be playing around with MagicOnion later and specifically looking at the gRPC aspect. Also going to see what it would take to transform the generated client code into something IL2CPP conforming (maybe a script that runs it through some regex to fix it up - like a codemod).
from magiconion.
I would like to get a Unity-grpc plugin work too. Could you provide us more info about your work, like how you compile .a file for iOS, then we can all contribute to this.
from magiconion.
+1 for separation of just gRPC client code. Cannot see any alternative for doing gRPC/HTTP2 in Unity (Especially when I need to stick to 4.x for now) 😨
Anyone was actually able to successfully perform some gRPC unary/server-side streaming call from unity using this package against properly "protobuf-generated" gRPC server? Could you guys show some example code, on how to do it? Not much details on that in this repo (: @Rurouni seems you were able to do it.
Thanks in advance, and especially @neuecc for bringing this.
from magiconion.
@Bplotka I don't think it will work agains proto generated gRPC server, but you can use it with ServerServiceDefinition and manually adding methods with whatever serialisation and building server (check what code grpc proto plugin does generate). To make stuff easier I am using single bidirectional streaming method with byte[]->byte[] signature and doing my own protobuf serialisation and dispatch into some handler.
from magiconion.
@Bplotka, I'm starting to look at using this to connect Unity to a gRPC server with proto request and responses already defined. It seems you are 18 days ahead of me. :) Any advice on setting it up before I dive in?
from magiconion.
@hubbaba Sure, what OS you want to run Unity on? I managed to get Unity working as a gRPC client on Windows (I have gRPC microservices on Linux in separate cloud). I can put more details during weekend.
from magiconion.
@Bplotka Thanks! and no rush. I really appreciate the help and I'll bet other people do as well. Windows works for me. The server is on linux (nodejs).
from magiconion.
@hubbaba, All: I have created this repo https://github.com/Bplotka/unity-grpc with separated gRPC library, Tutorial and examples, to cover all the steps and problems I ran into while chasing Unity + gRPC.
Hope it will be helpful for all of you guys (: Let me know if you have any more questions.
Thanks @neuecc for the gRPC lib, I think it unblocked us all...!
from magiconion.
@Bplotka Thank you for the gRPC library stand-alone! However I'm having some problems with manual code creation. Can you provide me assistance on that matter?
P.S. - I explained in more detail my problem in the standalone repository.
from magiconion.
I responded to your question in the bwplotka/unity-grpc#1
from magiconion.
Thanks @Bplotka !! I'll check it out this weekend and let you know how it goes. Thank you so much!
from magiconion.
Currently gRPC supports Unity and build binary is officialy released(beta).
https://packages.grpc.io/
MagicOnion2 uses it.
from magiconion.
Related Issues (20)
- MagicOnion.Generated.cs fails to compile in unity HOT 6
- StreamingHubClientBase exception handling error
- Unhandleable exceptions when connecting HOT 1
- Question: any thoughts on reliable UDP or QUIC? And QoS?
- Question: How can I connect the TLS protocol to the new version (v5.1.8)? HOT 1
- Question: Possible to use Task and ValueTask instead of UnaryResult and such? HOT 1
- Question: ObjectDisposedException on proxy side
- Question: Is a MagicOnion server possible from within Unity?
- can support Webgl http2 and net8?
- I can't have multiple implementations!
- .NET 8 Support
- Client filter is not triggered for ServerStreamingResult method in services. HOT 1
- Performance is very slow, taking 355ms for the Add function to return the result HOT 2
- How can I disconnect a client by server?
- InternalsVisibleTo lead to warnings on dependent project HOT 1
- Implement Protobuf Endpoint
- ServerReflection does not work
- Cannot work after changing to MemoryPack HOT 2
- Console app probem: PlatformNotSupportedException HOT 1
- support webgl? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from magiconion.