Giter VIP home page Giter VIP logo

Comments (17)

neuecc avatar neuecc commented on May 14, 2024 1

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.

bwplotka avatar bwplotka commented on May 14, 2024 1

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.

Rurouni avatar Rurouni commented on May 14, 2024

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.

neuecc avatar neuecc commented on May 14, 2024

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.

Rurouni avatar Rurouni commented on May 14, 2024

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.

aerykk avatar aerykk commented on May 14, 2024

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.

chenditc avatar chenditc commented on May 14, 2024

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.

bwplotka avatar bwplotka commented on May 14, 2024

+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.

Rurouni avatar Rurouni commented on May 14, 2024

@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.

hubbaba avatar hubbaba commented on May 14, 2024

@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.

bwplotka avatar bwplotka commented on May 14, 2024

@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.

hubbaba avatar hubbaba commented on May 14, 2024

@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.

bwplotka avatar bwplotka commented on May 14, 2024

@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.

pitaslayer avatar pitaslayer commented on May 14, 2024

@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.

bwplotka avatar bwplotka commented on May 14, 2024

I responded to your question in the bwplotka/unity-grpc#1

from magiconion.

hubbaba avatar hubbaba commented on May 14, 2024

Thanks @Bplotka !! I'll check it out this weekend and let you know how it goes. Thank you so much!

from magiconion.

neuecc avatar neuecc commented on May 14, 2024

Currently gRPC supports Unity and build binary is officialy released(beta).
https://packages.grpc.io/
MagicOnion2 uses it.

from magiconion.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.