openavikom / mr-grpc-unity Goto Github PK
View Code? Open in Web Editor NEWUse gRPC to send protocol buffer messages from and to Unity
Use gRPC to send protocol buffer messages from and to Unity
I currently can't build my App for Arm64 in VS without getting an error. When I use your generated files everything works without problems so I wanted to check how you generated the c# files.
Sadly there is no "csharp" mockup project that I can build to generate my files. Could you please update this/ let me know how to setup one myself?
Hi @aleneum
thanks for providing this code. I tried to build the app and deploy it to the HL2 emulator and the real HL2. The demo works in Unity in Playmode, but doesn't when built for the emulator or the real HL2.
My setup is:
Win10, with WSL2 where the gRPC server was running (port forwarding etc. is working and validated)
Unity Version: tried with 2019.4.35f1 and 2020.3.28.f1, Currently downloading 2021 and 2022 to try with them as well.
In the Unity Case:
In all fail-cases the error message was:
Sending message 'Hello from Unity!' to IP:9091
[...]
RpcException: Status(StatusCode=Unavailable, Detail="failed to connect to all addresses")
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <00000000000000000000000000000000>:0
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00000] in <00000000000000000000000000000000>:0
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00000] in <00000000000000000000000000000000>:0
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00000] in <00000000000000000000000000000000>:0
at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () [0x00000] in <00000000000000000000000000000000>:0
at Grpc.Core.Internal.AsyncCall`2[TRequest,TResponse].UnaryCall (TRequest msg) [0x00000] in <00000000000000000000000000000000>:0
at Grpc.Core.Calls.BlockingUnaryCall[TRequest,TResponse] (Grpc.Core.CallInvocationDetails`2[TRequest,TResponse] call, TRequest req) [0x00000] in <00000000000000000000000000000000>:0
at Grpc.Core.DefaultCallInvoker.BlockingUnaryCall[TRequest,TResponse] (Grpc.Core.Method`2[TRequest,TResponse] method, System.String host, Grpc.Core.CallOptions options, TRequest request) [0x00000] in <00000000000000000000000000000000>:0
at Grpc.Core.Interceptors.InterceptingCallInvoker.<BlockingUnaryCall>b__3_0[TRequest,TResponse] (TRequest req, Grpc.Core.Interceptors.ClientInterceptorContext`2[TRequest,TResponse] ctx) [0x00000] in <00000000000000000000000000000000>:0
at Grpc.Core.Interceptors.Interceptor+BlockingUnaryCallContinuation`2[TRequest,TResponse].Invoke (TRequest request, Grpc.Core.Interceptors.ClientInterceptorContext`2[TRequest,TResponse] context) [0x00000] in <00000000000000000000000000000000>:0
at Grpc.Core.ClientBase+ClientBaseConfiguration+ClientBaseConfigurationInterceptor.BlockingUnaryCall[TRequest,TResponse] (TRequest request, Grpc.Core.Interceptors.ClientInterceptorContext`2[TRequest,TResponse] context, Grpc.Core.Interceptors.Interceptor+BlockingUnaryCallContinuation`2[TRequest,TResponse] continuation) [0x00000] in <00000000000000000000000000000000>:0
at Grpc.Core.Interceptors.InterceptingCallInvoker.BlockingUnaryCall[TRequest,TResponse] (Grpc.Core.Method`2[TRequest,TResponse] method, System.String host, Grpc.Core.CallOptions options, TRequest request) [0x00000] in <00000000000000000000000000000000>:0
at Proto.Services.HelloService+HelloServiceClient.SayHello (Proto.Messages.HelloMessage request, Grpc.Core.CallOptions options) [0x00000] in <00000000000000000000000000000000>:0
at Proto.Services.HelloService+HelloServiceClient.SayHello (Proto.Messages.HelloMessage request, Grpc.Core.Metadata headers, System.Nullable`1[T] deadline, System.Threading.CancellationToken cancellationToken) [0x00000] in <00000000000000000000000000000000>:0
at HelloMessageSender.SendMessage () [0x00000] in <00000000000000000000000000000000>:0
at UnityEngine.Events.UnityAction.Invoke () [0x00000] in <00000000000000000000000000000000>:0
at UnityEngine.Events.InvokableCall.Invoke () [0x00000] in <00000000000000000000000000000000>:0
at UnityEngine.Events.UnityEvent.Invoke () [0x00000] in <00000000000000000000000000000000>:0
at Microsoft.MixedReality.Toolkit.UI.Interactable.SendOnClick (Microsoft.MixedReality.Toolkit.Input.IMixedRealityPointer pointer) [0x00000] in <00000000000000000000000000000000>:0
at Microsoft.MixedReality.Toolkit.UI.Interactable.TriggerOnClick (System.Boolean force) [0x00000] in <00000000000000000000000000000000>:0
at Microsoft.MixedReality.Toolkit.PhysicalPressEventRouter.OnHandPressTriggered () [0x00000] in <00000000000000000000000000000000>:0
at UnityEngine.Events.UnityAction.Invoke () [0x00000] in <00000000000000000000000000000000>:0
at UnityEngine.Events.InvokableCall.Invoke () [0x00000] in <00000000000000000000000000000000>:0
at UnityEngine.Events.UnityEvent.Invoke () [0x00000] in <00000000000000000000000000000000>:0
at Microsoft.MixedReality.Toolkit.UI.PressableButton.UpdatePressedState (System.Single pushDistance) [0x00000] in <00000000000000000000000000000000>:0
at Microsoft.MixedReality.Toolkit.UI.PressableButton.UpdateTouch () [0x00000] in <00000000000000000000000000000000>:0
at Microsoft.MixedReality.Toolkit.UI.PressableButton.Update () [0x00000] in <00000000000000000000000000000000>:0
The link.xml
file is there, I made sure that the server/WSL portforwarding etc. works by launching the send python script from another PC and sending the request to the same IP address.
My guess is that the IL2CPP compiler and/or code-stripping breaks something.
Do you have any idea what could cause the issues?
Thanks,
Eric
I copied your Plugins folder in the Assets folder of my project but my script can't find the assemblies and I get several errors like this:
The type or namespace name 'Google' could not be found in the global namespace (are you missing an assembly reference?)
What could be the problem?
Hi all,
did anyone ever get grpc to compile for iOS?
I see that there are iOS runtime binaries, but I get tons of compilation errors in Unity. Happy to post more details, but I'd first like to know if it's supposed to be possible.
Cheers,
Eric
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.