Giter Club home page Giter Club logo

Comments (4)

5argon avatar 5argon commented on August 22, 2024

Hi, I took a screenshot from my proto definition. This is how you use it :

Screenshot 2019-08-21 16 42 27

So the class is already there in the Protobuf.dll, and in using Google.Protobuf (try typing Google.Protobuf.WellknownTypes. and you will find them in the intellisense.) If you copy it again to your game then it's a duplicate declaration. So what's left is just letting Protobuf generating the C# class. The generated property declaration will look like this :

Screenshot 2019-08-21 16 43 59

from protobuf-unity.

akoolenbourke avatar akoolenbourke commented on August 22, 2024

Thanks for the reply but the compiler can't find timestamp.proto.

Protobuf Unity : google/protobuf/timestamp.proto: File not found.

I use import "google/protobuf/timestamp.proto";

Intellisense in my.proto finds google.protobuf.timestamp as I type but then it seems to find both capitalised and non capitalised versions of Timestamp. Intellisense in c# code finds it, but it's a compile error even after using Google.Protobuf;

You mentioned 'Protobuf.dll' I assume you meant Google.Protobuf.dll? I assume I need some special build of this. There is no redistributable anywhere. I built it on Windows but maybe that didn't include the wellknowntypes

from protobuf-unity.

akoolenbourke avatar akoolenbourke commented on August 22, 2024

OK, I just rebuilt on mac and confirmed with ilspy that the WellKnownTypes were there in the dll. However the import still says it can't find the timestamp.proto file. Am I actually meant to put those files somewhere? Does protoc know to actually grab the proto imports from an actual dll??

from protobuf-unity.

akoolenbourke avatar akoolenbourke commented on August 22, 2024

And to follow up, in the end I had to find the wellknown types proto files and copy them to /usr/local/include

from protobuf-unity.

Related Issues (15)

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.