libprotobuf for Unreal Engine 4
Link the google's protocol bufffers library as the third party in Unreal Engine 4.
- Import or copy this project into <your project or plugin>/Source/ThirdParty/libprotobuf.
- Add the libprotobuf as a module into <your project>.Build.cs
- PrivateDependencyModuleNames.AddRange(new string[] { "CoreUObject", "Engine", "libprotobuf" });
- Generate two code files (header & source, ex: Message.pb.h & Message.pb.cc) of the protocal by protocforcpp. (Ref: Google's Protocol Buffers)
- Put them into the source directory (PrivateorPublic) of your project.
- 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
 
- 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
 
- Include and use the header file(ex: Message.pb.h) in your .cppfile.
- 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.