Comments (4)
Hi, I took a screenshot from my proto definition. This is how you use it :
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 :
from protobuf-unity.
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.
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.
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)
- I Want to show protobuf icon HOT 2
- A unity question about ecs singleton
- ReadOnlySequence<> Error HOT 8
- Constant reimport in Unity editor, may or may not be protobuf issue.
- Unset grpcPath doesn't have correct behavior HOT 2
- Unable to compile and produce files from .proto HOT 1
- Long Unity startup times due to protobuf HOT 1
- Error when Path to protoc contain space character HOT 1
- Installation problems HOT 1
- Better UMP support
- Error with build Android package
- Is it allow to only compile .proto file under specify folder? HOT 1
- Protoc doesn't like spaces in paths on Windows.
- Can't find Google.protobuf HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from protobuf-unity.