Giter VIP home page Giter VIP logo

Comments (7)

Xbathy avatar Xbathy commented on September 2, 2024

where is the mock project "csharp"?

from mr-grpc-unity.

aleneum avatar aleneum commented on September 2, 2024

Hello @HaiKonofanDesu and @Xbathy,

I don't plan to provide a csharp project since grpc-dotnet works fundamentally different than the provided grpc solution based on the (previously used) approach based on the (C++) grpc core. Proto files can be found in the proto folder while the generated proto files are located at UnityGRPC/Assets/Proto. Those files have been generated with grpc-tools and can be automatically generated with appropriate csproj-settings. In UnityGRPC/Assets/Proto you will find some GRPC service and client definitions you can use as a foundation but as I mentioned earlier, grpc-dotnet works differently and makes way more use of underlying C# magic, hooks, dependency injection etc. I suggest following the documentation. When you set up your project and copy the proto files into your project it should be able to communicate with Unity or the python server/client.

However, if anyone has a minimal working example grpc-dot project, feel free to create PR.

from mr-grpc-unity.

Xbathy avatar Xbathy commented on September 2, 2024

do you remember the version of Google.Protobuf? When i use 3.22.1 to build proto files, there will be errors in unity ,I think the version is different, but i don't the version of this project, i want to build custom proto files, thanks.
image

from mr-grpc-unity.

aleneum avatar aleneum commented on September 2, 2024

Sorry,

I just realized the documentation actually states:

For Unity, you need to use dotnet and build the mock project csharp. All required dependencies will be installed by dotnet.

Seems like I forgot to add this part when I created the example. I have no machine to test this right now but this csproj was used in the pipeline to create CSharp files and served us well so far:

<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <TargetFramework>netstandard2.0</TargetFramework>
    <Protobuf_NoWarnMissingExpected>true</Protobuf_NoWarnMissingExpected>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="Grpc.Tools" Version="2.23.0">
      <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
      <PrivateAssets>all</PrivateAssets>
    </PackageReference>
    <Protobuf Include="../proto/*.proto" ProtoRoot="../proto" OutputDir="../UnityGRPC/Assets/Proto" CompileOutputs="false" />
  </ItemGroup>
</Project>

Path might be wrong though. I will give it a try in the evening (CET).

from mr-grpc-unity.

Xbathy avatar Xbathy commented on September 2, 2024

from mr-grpc-unity.

aleneum avatar aleneum commented on September 2, 2024

Hello @Xbathy,

unfortunately I cannot work on this repo right now (for the next 20 days) since the available LFS bandwith has been already drained by too many clones/downloads. There is a 1GB quota for the whole OpenAvikom org and this has been surpassed already. As mentioned in the README, cloning the repo ONCE downloads roughly 300MB. Thus, it just takes a couple of cloning operations to hit the wall. I will add the csproj file/project mock when the quota resets. As mentioned on the release page, the code can still be downloaded here.

from mr-grpc-unity.

aleneum avatar aleneum commented on September 2, 2024

Alright, I could add the files via web interface and test it locally. Seems to be the missing piece. Sorry, @HaiKonofanDesu for letting this one slip. Even though there is a considerable version gap since the Unity components are a bit dated, it is still possible to send messages from Python to Unity. I will close this one since the csharp project has been added and can be used to generate csharp files.

from mr-grpc-unity.

Related Issues (4)

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.