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 README.md
Latest commit 72aa192 Nov 20, 2017
Permalink
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
.gitmodules
CHANGELOG
LICENSE
README.md Add Gitter badge Nov 20, 2017
libprotobuf.Build.cs
regenerateforue4.py

README.md

libprotobuf for Unreal Engine 4

Join the chat at https://gitter.im/code4game/libprotobuf

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

Usage

  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 & Message.pb.cc) 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 regenerateforue4.py.
    • python regenerateforue4.py 'the source file'
    • ex: python regenerateforue4.py Message.pb.cc
    • 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.

Roadmap

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

License

Use The MIT License.

Copyright (c) 2016, Code 4 Game.