1.Integrating ProudNet into Unreal Engine 4 Project

junghoon.lee

1.1How to create a UE4 project for ProudNet integration

  1. 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.

  1. In the 'Select Template' window, select 'Blank' and click 'Next'.

  1. In the 'Project Settings' window, click the 'Blueprint' button. This will expand the button to a drop down list.

  1. From the expanded drop-down list, select C++ as shown in the screenshot below.

  2. 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'.

  1. When the project creation is finished, the Visual Studio IDE and UE4 Editor are executed at the same time as the created project.

  2. 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

  1. 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.

  2. 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.

  3. 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"))

  4. 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"))

  5. 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

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)