Python C#
Switch branches/tags
Nothing to show
Clone or download
alexchicn Merge pull request #6 from gitter-badger/gitter-badge
Add a Gitter chat badge to
Latest commit 72aa192 Nov 20, 2017
Failed to load latest commit information.
lib [CODE] fix a compiler error - can't package in the UE4 editor for Win32 May 22, 2016
protobuf @ d5fb408
LICENSE Add Gitter badge Nov 20, 2017

libprotobuf for Unreal Engine 4

Join the chat at

Link the google's protocol bufffers library as the third party in Unreal Engine 4.


  1. Import or copy this project into <your project or plugin>/Source/ThirdParty/libprotobuf.
  2. Add the libprotobuf as a module into <your project>.Build.cs
  • PrivateDependencyModuleNames.AddRange(new string[] { "CoreUObject", "Engine", "libprotobuf" });
  1. Generate two code files (header & source, ex: Message.pb.h & of the protocal by protoc for cpp. (Ref: Google's Protocol Buffers)
  2. Put them into the source directory (Private or Public) of your project.
  3. Regenerate the code file for Unreal Engine 4 by
    • python 'the source file'
    • ex: python
    • You should get this information: Success to regenerate the code for UE4
  4. You need include two header files when include the header file(ex: Message.pb.h).
    • #include "AllowWindowsPlatformTypes.h" //< before include the header file
    • #include "your code header file" //< ex: #include "Message.pb.h"
    • #include "HideWindowsPlatformTypes.h" //< after include the header file
  5. Include and use the header file(ex: Message.pb.h) in your .cpp file.
  6. That's all.


  • Write a tutorial for the usage and create an example
  • Support mobile platforms - Android/iOS/Windows Phone


Use The MIT License.

Copyright (c) 2016, Code 4 Game.