Skip to content

bluexo/Unity.Protobuf.Editor

Repository files navigation

Unity.Protobuf.Editor

简体中文

Unity3d Google Protobuf C# & lua generator

Note

  • Lua generator not support Proto3
  • C# generator generate Proto3 with protoc.exe and Proto2 with ProtoGen.exe
        var sample = new Proto3Sample() { 
            Id = 1, 
            Email = "[email protected]", 
            Name = "Alvin" 
        };

        // Serialize to bytes
        var bytes = sample.ToByteArray();

        // Serialize to stream
        var stream = new MemoryStream();
        sample.WriteTo(stream);

        //Deserialize from bytes
        sample = Proto3Sample.Parser.ParseFrom(bytes);

        //Deserialize from json string
        sample = Proto3Sample.Parser.ParseJson("");

Screenshot

About

Google Protobuf C# & lua generator with Unity3d

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages