Unity support
See original GitHub issueI know that Unity support isn’t planned for grpc-dotnet
(#710 and #1155).
However, since Grpc.Core is going to be deprecated (see The future of gRPC in C# belongs to grpc-dotnet), what is the plan for Unity users? I haven’t seen anything related in the blog post.
I know that Unity support was experimental, but are you 100% dropping it?
Issue Analytics
- State:
- Created 2 years ago
- Reactions:22
- Comments:49 (14 by maintainers)
Top Results From Across the Web
Unity Support
Accounts Articles relating to Unity ID accounts, sometimes called UDN, and also Unity Organizations and management.
Read more >Unity Customer Service: Technical Support & Training
Unity Gaming Services support. Read documentation, watch videos, and access support for Unity Ads, Unity Cloud Build, Unity Analytics, and more.
Read more >Contact Unity Support
To help us provide effective and timely support, use the Unity Support Contact form to submit your questions and support requests.
Read more >Success Plans - Technical support
Unity Starter Success. Our entry-level support plan to help you efficiently solve technical issues and get your project back on track. · Unity...
Read more >Unity Help Desk Contacts
How to contact Unity's customer service via email, live chat support, phone number, social media support, and self-service support.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Grpc.Net.Client
on Unity requires Unity to add support for HTTP/2. If HTTP/2 andnetstandard2.1
are supported, thenGrpc.Net.Client
will start working without any changes.I want this to happen and I asked the Unity team about it here.
Basically, the work required is in Unity. You should tell them that gRPC is important to you so they prioritize it. I don’t know the best way to do that. Comment on Unity Future .NET Development Status?
Alright, its actually even much simpler. You can use all the libraries targeting netstandard2.1 by default, the Grpc.Core.Api needs to be recompiled for netstandard2.1 instead of 2.0 else it won’t link in Unity (the System.Memory issue). You don’t even need to change any files that way.
If you’re using Google.Protobuf (which I guess a lot of you will be) you also need to recompile that for netstandard 2.1 (or include it in the project). You need to be careful there that it actually has a dependency set per target framework in the csproj:
where you need to add:
do note the Version 6.0.0 for System.Runtime.CompilerServices.Unsafe as that is the version that Unity apparently ships with.
So in total you’re going to need the following dlls for Grpc Web to work in Unity:
optionally:
You can then use any code generated clients in Unity. I have not tested server mode in any way and I don’t think there is an easy way to get it to work.
For code generated clients you can either add the source or just add any library that you built yourself targeting netstandard2.1.
Maybe in the future Grpc will work without the Web intermediate form, but for now Grpc Web is as good as its going to get and its still faster than REST.