1.1How to create a UE4 project for ProudNet integration
In the following window immediately after launching UE4 Editor, select 'Game' indicated by a red box in the screenshot, and when the'Open Project' button changes to 'Next', press the 'Next' button.
In the 'Select Template' window, select 'Blank' and click 'Next'.
In the 'Project Settings' window, click the 'Blueprint' button. This will expand the button to a drop down list.
From the expanded drop-down list, select C++ as shown in the screenshot below.
In the screenshot below, enter the path to create the project and the name of the project to be created in the 'Project Path Window' and 'Project Name Window' indicated by the red boxes, and click 'Create Project'.
When the project creation is finished, the Visual Studio IDE and UE4 Editor are executed at the same time as the created project.
In the Visual Studio IDE, you must specify the Configuration and Platform as below and proceed.
- Solution Configuration : Development Editor
- Solution Platform : Win64
1.2Integrating Proudnet into UE4 projects
You can specify the path to the Proudnet library and header files in C# code in the (project name).build.cs file. Here are the details on how to specify.
When you open the cs file mentioned above, there will be the same class as the project name automatically generated by UE4 Editor. And the class currently has only a constructor.
If you look at the body of the constructor, you'll see a few lines of comments at the back. You can put code that specifies the path to the Proudnet library and header files after the comment.
To specify the path to the ProudNet library reference, you can pass the library path string to the Add function of the global object named PublicAdditionalLibraries. (ex> PublicAdditionalLibraries.Add(@"D:\ProudNet1.7.48971-master\ProudNet\lib\x64\v140\Release\ProudNetClient.lib"))
To specify the path to the Proudnet header file reference, you can pass the path of the Proudnet include folder with the Add function of the global object named PublicIncludepaths. (ex> PublicIncludePaths.Add(@"D:\ProudNet1.7.48971-master\ProudNet\include"))
The UE4 project that connects ProudNet must be built in 64-bit, so wrap the two statements written above with braces and put an if statement on top. Enter "Target.Platform == UnrealTargetPlatform.Win64" as the condition of the if statement.
If you follow steps 1-6 above, the correction is completed as follows.
// Copyright Epic Games, Inc. All Rights Reserved. using UnrealBuildTool; public class TestUnreal4 : ModuleRules { public TestUnreal4(ReadOnlyTargetRules Target) : base(Target) { PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs; PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore" }); PrivateDependencyModuleNames.AddRange(new string[] { }); // Uncomment if you are using Slate UI // PrivateDependencyModuleNames.AddRange(new string[] { "Slate", "SlateCore" }); // Uncomment if you are using online features // PrivateDependencyModuleNames.Add("OnlineSubsystem"); // To include OnlineSubsystemSteam, add it to the plugins section in your uproject file with the Enabled attribute set to true if (Target.Platform == UnrealTargetPlatform.Win64) { PublicAdditionalLibraries.Add(@"D:\ProudNet1.7.48971-master\ProudNet\lib\x64\v140\Release\ProudNetClient.lib"); PublicIncludePaths.Add(@"D:\ProudNet1.7.48971-master\ProudNet\include"); } } }
1.3Android
First of all, please refer to the link below.
https://docs.unrealengine.com/en-US/Platforms/Mobile/Android/GettingStarted/index.html
Refer to "ProudNet\lib\NDK\r20\cmake\clangDebug\arm64-v8a\libProudNetClient.a" instead of "ProudNet\lib\x64\v140\Release\libProudNetClient.lib".
1.4IOS
For iOS, the path of libiconv.2.tbd library must be additionally specified. (If not specified, iconv related link error occurs during build)
First of all, please refer to the link below.
https://docs.unrealengine.com/en-US/Platforms/Mobile/iOS/QuickStart/index.html
Refer to "ProudNet\lib\IOS\LLVM\arm64only\Release\libProudNetClient.a" instead of "ProudNet\lib\x64\v140\Release\libProudNetClient.lib".