UNREAL
Last updated
Last updated
Download the Latest Version
The method to run the Naver Game SDK’s sample project in the Unreal Engine is as follows.
Run the project in the sample/unreal-sample-4.23.1 folder in Unreal Editor.
Open the Contents -> NewMap.umap file.
Check if the NNGUnrealSampleGameMode has been set in World Setting -> Game Mode.
Run it on a test device by clicking on the StartHome button to confirm that the SDK running normally.
This guideline has been written based on the Unreal 4.23.1 version.
If there is no project present, create a new project.
If the project is running, decompress the NaverGameSdk_xxx.zip file in the package folder and paste it into the Plugins folder. If there is no Plugins folder, create a new one. The folder must be named NaverGameSdk.
Reboot Unreal Engine and confirm that the NaverGameSDK has been applied properly to the others section by running the setting’s plugin.
If the plugin has been set, using the blueprint, guide the method of applying the NaverGameSdk to the Unreal Project.
Edit the level blueprint of the current level.
If the level blueprint has been opened, set it to display the main menu that had already been generated at the beginning of the game.
Select Generate Widget by dragging the cursor of the BeginPlay event.
After generating the widget, select the Class’ drop box and connect the mainMenu blueprint.
Run the Add to Viewport command by dragging the next flow of Generate Widget. Connect the Return Value for the target.
Open the source panel of the contents browser and edit the mainMenu blueprint by selecting the NaverGameSdk contents folder.
Enter the graph edit screen, and edit the Init function’s factors according to the client.
Client Id: The Client Id received after registering the application at the developers center upon logging in with a Naver Id.
Client Secret: The client secret received after registering the application at developers center upon logging in with a Naver Id.
Lounge Id: The Lounge Id received after requesting the official lounge.
The callback function (Delegate) can be registered using the following method.
The common setting for plug engine has been completed.
Set the system settings for Android and iOS that follow.
The Android version only supports Gradle builds. Convert to Gradle build by checking Enable Gradle Instead of Ant.
Open the ApkPackaging section, click on the Add Element to Application Node button, then add the android.requestLegacyExternalStorage="true" category.
For Target SDK Versions -> 30 and above, android.requestLegacyExternalStorage does not have to be added.
Naver Game iOS SDK supports iOS versions 12.0 and above.
Add project settings to the DefaultEngine.ini file as follows.
Build.cs 파일에 다음과 같이 프레임워크 설정을 추가합니다.
The init() method is the method that sets the NaverGameSDK.
ClientId: The Client Id received after registering the application at developers center upon logging in with a Naver Id.
ClientSecret: The client secret received after registering the application at developers center upon logging in with a Naver Id.
LoungeId: The Lounge Id received after requesting the official lounge.
The Terminate() method is the method that terminates the NaverGameSDK. It is called in when the sdk has to be terminated under certain circumstances. For example, when running an in-game menu code that is delivered through OnReceiveInGameMenuCode Delegate callback, the TerminateSdk() method must be called to terminate the sdk.
The method that displays a registered banner window.
The method that posts a specific notification page or a notification maintenance page that has been registered.
This method immediately runs a certain board. BoardId can be found in the URL shown when accessing the board through the web, in the form of https://game.naver.com/lounge/{loungeId}/board/{boardId}.
The method that runs using the number of the registered post. For scheduled notification post that have been scheduled through scheduled exposure, the number of the scheduled post must be inputted into FeedId and IsTempFeedId must be inputted as True. Before the scheduled post is posted, running the method does not lead to the exposure of the post.
FeedId: The number of the notification post or the scheduled notification post.
IsTempFeedId: Remains false if the FeedId is a notification post and remains true is FeedId is a scheduled notification post.
This method runs the writer page. BoardId is the board number, Title is the title of the writing, Text is the content of the writing, and ImageFilePath is the path of the attached image. Only one image may be attached.
Not all parameters are necessary. If entered, they will be set in the writer page in advance.
boardId: This is the board number. This can be found in the URL shown while accessing the board through the web, in the form of https://game.naver.com/lounge/{loungeId}/board/{boardId}.
title: This is the title of the writing.
text: This is the text to be added to the main body.
imageFilePath: This is the LocalPath of the image to be attached. In Android, there is a process of obtaining image rights, so if this value is manually entered, it needs to be checked thoroughly.
This method shows a button for writing by detecting when a user has taken a screenshot. When not summoned, the base value is ON (true).
If enabled: true, writing button appears when a screenshot is captured.
This method syncs with NAVER Login and matches the user and their NAVER ID. This can be used to confirm the game ID of users that win event draws through posts and comments.
This called be called at any point after the init function is called.
gameId: Input an identifiable game ID. Only one game ID is saved for one NAVER ID.
The following example is a demonstration of the implementation of the setGameId() method.
Obtain the countryCode of the Android device.
The countryCode is the country code (ISO 3166-1 alpha-2) composed of two alphabets. This enables branch processing by countries within the codes. The notable country codes are as shown in the following. Refer to the link for other country codes.
Country Code
Country
CN
China
JP
Japan
KR
Republic of Korea
TH
Thailand
US
United States of America
When a specific event occurs within the SDK, using said event, the GameEngine is notified.
Occurs when NaverGameSdk is running.
The registration method is as follows.
Occurs when NaverGameSdk has been terminated.
The registration method is as follows.
Occurs when the in-game menu code has to be run in NaverGameSdk. Used when an 'In-Game Menu’ has been registered on the banners of Official Lounge Maintenance> Page >SDK Maintenance>Banner Maintenance pages. Depending on the Android and iOS platforms, the registered values are delivered independently, so if different values have been inputted, they must be processed independently.
The registration method is as follows.