diff --git a/package/NaverGameSdk-1.1.4.zip b/package/NaverGameSdk-1.1.4.zip deleted file mode 100644 index b3d73c0..0000000 Binary files a/package/NaverGameSdk-1.1.4.zip and /dev/null differ diff --git a/package/NaverGameSdk-1.2.0.zip b/package/NaverGameSdk-1.2.0.zip new file mode 100644 index 0000000..26cb2bd Binary files /dev/null and b/package/NaverGameSdk-1.2.0.zip differ diff --git a/sample/unreal-sample-4.23.1/Config/DefaultEngine.ini b/sample/unreal-sample-4.23.1/Config/DefaultEngine.ini index d0264e4..eca2acf 100644 --- a/sample/unreal-sample-4.23.1/Config/DefaultEngine.ini +++ b/sample/unreal-sample-4.23.1/Config/DefaultEngine.ini @@ -224,6 +224,7 @@ IOSTeamID=GST65JV9LK MinimumiOSVersion=IOS_12 AdditionalLinkerFlags=-ObjC -lc++ AdditionalShippingLinkerFlags=-ObjC -lc++ +AdditionalPlistData=CFBundleURLTypes CFBundleURLSchemes gLinkSample NSAppTransportSecurityNSAllowsArbitraryLoads LSApplicationQueriesSchemesnaversearchappnaversearchthirdlogin CFBundleURLTypesCFBundleTypeRoleEditorCFBundleURLSchemesnngsdksampleNSPhotoLibraryUsageDescriptionAccess your photos to create a post. [/Script/Engine.PhysicsSettings] DefaultGravityZ=-980.000000 diff --git a/sample/unreal-sample-4.23.1/Plugins/NaverGameSdk/Content/mainMenu.uasset b/sample/unreal-sample-4.23.1/Plugins/NaverGameSdk/Content/mainMenu.uasset index 046ff6a..ecd6e39 100644 Binary files a/sample/unreal-sample-4.23.1/Plugins/NaverGameSdk/Content/mainMenu.uasset and b/sample/unreal-sample-4.23.1/Plugins/NaverGameSdk/Content/mainMenu.uasset differ diff --git a/sample/unreal-sample-4.23.1/Plugins/NaverGameSdk/NaverGameSdk.uplugin b/sample/unreal-sample-4.23.1/Plugins/NaverGameSdk/NaverGameSdk.uplugin index 568f7ff..22d4aac 100644 --- a/sample/unreal-sample-4.23.1/Plugins/NaverGameSdk/NaverGameSdk.uplugin +++ b/sample/unreal-sample-4.23.1/Plugins/NaverGameSdk/NaverGameSdk.uplugin @@ -1,7 +1,7 @@ { - "FileVersion": 4, + "FileVersion": 3, "Version": 1, - "VersionName": "1.1.4", + "VersionName": "1.2.0", "FriendlyName": "NaverGameSdk", "Description": "naver game sdk", "Category": "Other", diff --git a/sample/unreal-sample-4.23.1/Plugins/NaverGameSdk/Source/NaverGameSdk/NaverGameSdk.Build.cs b/sample/unreal-sample-4.23.1/Plugins/NaverGameSdk/Source/NaverGameSdk/NaverGameSdk.Build.cs index dd52654..ba432d0 100644 --- a/sample/unreal-sample-4.23.1/Plugins/NaverGameSdk/Source/NaverGameSdk/NaverGameSdk.Build.cs +++ b/sample/unreal-sample-4.23.1/Plugins/NaverGameSdk/Source/NaverGameSdk/NaverGameSdk.Build.cs @@ -7,7 +7,7 @@ public class NaverGameSdk : ModuleRules private string ThirdPartyPath { - get { return Path.GetFullPath(Path.Combine(ModuleDirectory, "../../ThirdPartyFrameworks/")); } + get { return Path.GetFullPath(Path.Combine(ModuleDirectory, "./ThirdPartyFrameworks/")); } } public NaverGameSdk(ReadOnlyTargetRules Target) : base(Target) @@ -73,7 +73,15 @@ public NaverGameSdk(ReadOnlyTargetRules Target) : base(Target) ) ); + PublicAdditionalFrameworks.Add( + new Framework( + "NaverLogin", + "./ThirdPartyFrameworks/iOS/NaverLogin.embeddedframework.zip" + ) + ); + bEnableObjCExceptions = false; + PublicFrameworks.AddRange( new string[] { diff --git a/sample/unreal-sample-4.23.1/Plugins/NaverGameSdk/Source/NaverGameSdk/NaverGameSdk_UPL.xml b/sample/unreal-sample-4.23.1/Plugins/NaverGameSdk/Source/NaverGameSdk/NaverGameSdk_UPL.xml index 1adb680..b4fe097 100644 --- a/sample/unreal-sample-4.23.1/Plugins/NaverGameSdk/Source/NaverGameSdk/NaverGameSdk_UPL.xml +++ b/sample/unreal-sample-4.23.1/Plugins/NaverGameSdk/Source/NaverGameSdk/NaverGameSdk_UPL.xml @@ -22,7 +22,7 @@ - + @@ -30,14 +30,7 @@ - - - - android.useAndroidX=true - android.enableJetifier=true - - - + allprojects { def mappings = [ @@ -51,6 +44,8 @@ 'android.arch.lifecycle.LifecycleObserver': 'androidx.lifecycle.LifecycleObserver', 'android.arch.lifecycle.OnLifecycleEvent': 'androidx.lifecycle.OnLifecycleEvent', 'android.arch.lifecycle.ProcessLifecycleOwner': 'androidx.lifecycle.ProcessLifecycleOwner', + 'android.support.v4.app.NotificationManagerCompat' : 'androidx.core.app.NotificationManagerCompat', + 'android.support.v4.content.FileProvider' : 'androidx.core.content.FileProvider' ] beforeEvaluate { project -> @@ -66,17 +61,38 @@ } + + + + android.useAndroidX=true + android.enableJetifier=true + + + + + + android { + compileOptions { + sourceCompatibility 1.8 + targetCompatibility 1.8 + } + } + + + + dependencies { - implementation files("libs/navergame-sdk-gradle-1.1.3.aar") // Navergame SDK - implementation "org.jetbrains.kotlin:kotlin-stdlib:1.3.72" // Kotlin + implementation files("libs/navergame-sdk-gradle-1.2.0.aar") // Navergame SDK + implementation "com.naver.nid:naveridlogin-android-sdk:4.2.6" //Naver Login SDK + implementation "org.jetbrains.kotlin:kotlin-stdlib:1.4.20" // Kotlin implementation "androidx.viewpager2:viewpager2:1.0.0" // Viewpager2 implementation "com.github.bumptech.glide:glide:3.7.0" // Glide - implementation "com.squareup.retrofit2:retrofit:2.7.2" // Retrofit2 + implementation "com.squareup.retrofit2:retrofit:2.9.0" // Retrofit2 implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0" //SwipeRefreshLayout - implementation "com.squareup.retrofit2:converter-gson:2.6.4" + implementation "com.squareup.retrofit2:converter-gson:2.9.0" } diff --git a/sample/unreal-sample-4.23.1/Plugins/NaverGameSdk/Source/NaverGameSdk/Private/Android/AndroidNaverGLink.cpp b/sample/unreal-sample-4.23.1/Plugins/NaverGameSdk/Source/NaverGameSdk/Private/Android/AndroidNaverGLink.cpp index 546b49d..b886e81 100644 --- a/sample/unreal-sample-4.23.1/Plugins/NaverGameSdk/Source/NaverGameSdk/Private/Android/AndroidNaverGLink.cpp +++ b/sample/unreal-sample-4.23.1/Plugins/NaverGameSdk/Source/NaverGameSdk/Private/Android/AndroidNaverGLink.cpp @@ -16,6 +16,11 @@ FAndroidNaverGLink::FAndroidNaverGLink() Method_StartBoard = FJavaWrapper::FindStaticMethod(Env, localGlinkClass, "startBoard", "(Landroid/app/Activity;I)V", false); Method_StartFeed = FJavaWrapper::FindStaticMethod(Env, localGlinkClass, "startFeed", "(Landroid/app/Activity;IZ)V", false); Method_GetCountryCode = FJavaWrapper::FindStaticMethod(Env, localGlinkClass,"getCountryCode", "(Landroid/app/Activity;)Ljava/lang/String;", false); + + Method_SetCanWriteFeedByScreenshot = FJavaWrapper::FindStaticMethod(Env, localGlinkClass, "setEnableScreenShot", "(Z)V", false); + Method_StartFeedWriting = FJavaWrapper::FindStaticMethod(Env, localGlinkClass, "writeFeed", "(Landroid/app/Activity;ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;)V", false); + Method_SetGameId = FJavaWrapper::FindStaticMethod(Env, localGlinkClass, "setGameId", "(Landroid/app/Activity;Ljava/lang/String;)V", false); + Env->DeleteLocalRef(localGlinkClass); } } @@ -62,6 +67,58 @@ void FAndroidNaverGLink::Init(FString ClientId, FString ClientSecret, FString Lo } + + + +void FAndroidNaverGLink::SetGameId(FString GameId) const { + if (JNIEnv * Env = FAndroidApplication::GetJavaEnv()) + { + jclass localGlinkClass = FAndroidApplication::FindJavaClass("com.navercorp.nng.android.sdk.NngNdkWrapper"); + + jstring gameId = Env->NewStringUTF(TCHAR_TO_UTF8(*GameId)); + + Env->CallStaticVoidMethod(localGlinkClass, Method_SetGameId, FJavaWrapper::GameActivityThis,gameId); + + + Env->DeleteLocalRef(gameId); + Env->DeleteLocalRef(localGlinkClass); + } + +} + +void FAndroidNaverGLink::SetCanWriteFeedByScreenshot(bool Enabled) const { + if (JNIEnv * Env = FAndroidApplication::GetJavaEnv()) + { + jclass localGlinkClass = FAndroidApplication::FindJavaClass("com.navercorp.nng.android.sdk.NngNdkWrapper"); + Env->CallStaticVoidMethod(localGlinkClass, Method_SetCanWriteFeedByScreenshot, Enabled); + Env->DeleteLocalRef(localGlinkClass); + } + +} + +void FAndroidNaverGLink::StartFeedWriting(int BoardId, FString Title, FString Text, FString ImageFilePath) const { + if (JNIEnv * Env = FAndroidApplication::GetJavaEnv()) + { + jclass localGlinkClass = FAndroidApplication::FindJavaClass("com.navercorp.nng.android.sdk.NngNdkWrapper"); + + jstring TitleJava = Env->NewStringUTF(TCHAR_TO_UTF8(*Title)); + jstring TextJava = Env->NewStringUTF(TCHAR_TO_UTF8(*Text)); + jstring ImagePathJava = Env->NewStringUTF(TCHAR_TO_UTF8(*ImageFilePath)); + + Env->CallStaticVoidMethod(localGlinkClass, Method_StartFeedWriting, FJavaWrapper::GameActivityThis,BoardId,TitleJava,TextJava,ImagePathJava); + + + Env->DeleteLocalRef(TitleJava); + Env->DeleteLocalRef(TextJava); + Env->DeleteLocalRef(ImagePathJava); + + Env->DeleteLocalRef(localGlinkClass); + + } + +} + + void FAndroidNaverGLink::StartHome() const { if (JNIEnv * Env = FAndroidApplication::GetJavaEnv()) { diff --git a/sample/unreal-sample-4.23.1/Plugins/NaverGameSdk/Source/NaverGameSdk/Private/Android/AndroidNaverGLink.h b/sample/unreal-sample-4.23.1/Plugins/NaverGameSdk/Source/NaverGameSdk/Private/Android/AndroidNaverGLink.h index 679ecc8..20058b5 100644 --- a/sample/unreal-sample-4.23.1/Plugins/NaverGameSdk/Source/NaverGameSdk/Private/Android/AndroidNaverGLink.h +++ b/sample/unreal-sample-4.23.1/Plugins/NaverGameSdk/Source/NaverGameSdk/Private/Android/AndroidNaverGLink.h @@ -15,15 +15,28 @@ class FAndroidNaverGLink : public INaverGLink jmethodID Method_StartBoard; jmethodID Method_StartFeed; jmethodID Method_GetCountryCode; + + jmethodID Method_SetCanWriteFeedByScreenshot; + jmethodID Method_StartFeedWriting; + jmethodID Method_SetGameId; + + public: FAndroidNaverGLink(); ~FAndroidNaverGLink(); FString GetCountryCode() const; void Init(FString ClientId, FString ClientSecret, FString LoungeId) const; + void SetCanWriteFeedByScreenshot(bool Enabled) const; + void SetGameId(FString GameId) const; + void StartHome() const; void StartSorry() const; void StartBoard(int BoardId) const; void StartFeed(int FeedId, bool IsTempFeedId) const; + void StartFeedWriting(int BoardId, FString Title, FString Text, FString ImageFilePath) const; + void FinishSdk() const; + + }; diff --git a/sample/unreal-sample-4.23.1/Plugins/NaverGameSdk/Source/NaverGameSdk/Private/GLink.cpp b/sample/unreal-sample-4.23.1/Plugins/NaverGameSdk/Source/NaverGameSdk/Private/GLink.cpp index 1063f72..f5f6f38 100644 --- a/sample/unreal-sample-4.23.1/Plugins/NaverGameSdk/Source/NaverGameSdk/Private/GLink.cpp +++ b/sample/unreal-sample-4.23.1/Plugins/NaverGameSdk/Source/NaverGameSdk/Private/GLink.cpp @@ -44,3 +44,18 @@ FString UGLink::GetCountryCode() { return GetSharedSdk()->GetCountryCode(); } + +void UGLink::SetCanWriteFeedByScreenshot(bool Enabled) +{ + GetSharedSdk()->SetCanWriteFeedByScreenshot(Enabled); +} + +void UGLink::SetGameId(FString GameId) +{ + GetSharedSdk()->SetGameId(GameId); +} + +void UGLink::ExecuteFeedWriting(int BoardId, FString Title, FString Text, FString ImageFilePath) +{ + GetSharedSdk()->StartFeedWriting(BoardId, Title, Text, ImageFilePath); +} diff --git a/sample/unreal-sample-4.23.1/Plugins/NaverGameSdk/Source/NaverGameSdk/Private/IOS/IOSNaverGLink.cpp b/sample/unreal-sample-4.23.1/Plugins/NaverGameSdk/Source/NaverGameSdk/Private/IOS/IOSNaverGLink.cpp index a630779..57587ab 100644 --- a/sample/unreal-sample-4.23.1/Plugins/NaverGameSdk/Source/NaverGameSdk/Private/IOS/IOSNaverGLink.cpp +++ b/sample/unreal-sample-4.23.1/Plugins/NaverGameSdk/Source/NaverGameSdk/Private/IOS/IOSNaverGLink.cpp @@ -15,13 +15,34 @@ #include "IOSView.h" +static void ListenNNGSDKOpenURL(UIApplication* application, NSURL* url, NSString* sourceApplication, id annotation) +{ + [NNGSDKManager.shared handleCallbackUrl:url]; +} + FIOSNaverGLink::FIOSNaverGLink() { } +FString FIOSNaverGLink::GetCountryCode() const +{ + return UTF8_TO_TCHAR(NaverGLinkCallbackObject.shared.countryCode); +} + void FIOSNaverGLink::Init(FString ClientId, FString ClientSecret, FString LoungeId) const { [NaverGLinkCallbackObject.shared setClientId:ClientId.GetNSString() clientSecret:ClientSecret.GetNSString() loungeId:LoungeId.GetNSString()]; + FIOSCoreDelegates::OnOpenURL.AddStatic(&ListenNNGSDKOpenURL); +} + +void FIOSNaverGLink::SetCanWriteFeedByScreenshot(bool Enabled) const +{ + [NaverGLinkCallbackObject.shared setCanWriteFeedByScreenshot:Enabled]; +} + +void FIOSNaverGLink::SetGameId(FString GameId) const +{ + [NaverGLinkCallbackObject.shared setGameId:GameId.GetNSString()]; } void FIOSNaverGLink::StartHome() const @@ -38,13 +59,6 @@ void FIOSNaverGLink::StartSorry() const }); } -void FIOSNaverGLink::FinishSdk() const -{ - dispatch_async(dispatch_get_main_queue(), ^{ - [NaverGLinkCallbackObject.shared finishSdk]; - }); -} - void FIOSNaverGLink::StartBoard(int BoardId) const { dispatch_async(dispatch_get_main_queue(), ^{ @@ -59,10 +73,18 @@ void FIOSNaverGLink::StartFeed(int FeedId, bool IsTempFeedId) const }); } +void FIOSNaverGLink::StartFeedWriting(int BoardId, FString Title, FString Text, FString ImageFilePath) const +{ + dispatch_async(dispatch_get_main_queue(), ^{ + [NaverGLinkCallbackObject.shared startFeedWritingWithBoardId:@(BoardId) title:Title.GetNSString() text:Text.GetNSString() imageFilePath:ImageFilePath.GetNSString()]; + }); +} -FString FIOSNaverGLink::GetCountryCode() const +void FIOSNaverGLink::FinishSdk() const { - return UTF8_TO_TCHAR(NaverGLinkCallbackObject.shared.countryCode); + dispatch_async(dispatch_get_main_queue(), ^{ + [NaverGLinkCallbackObject.shared finishSdk]; + }); } @@ -82,6 +104,11 @@ FString FIOSNaverGLink::GetCountryCode() const } +- (NSString *)countryCode { + return NNGSDKManager.shared.countryCode; +} + + - (void)setClientId:(NSString *)clientId clientSecret:(NSString *)clientSecret loungeId:(NSString *)loungeId { [NNGSDKManager.shared setClientId:clientId clientSecret:clientSecret loungeId:loungeId]; } @@ -93,6 +120,16 @@ FString FIOSNaverGLink::GetCountryCode() const } +- (void)setCanWriteFeedByScreenshot:(BOOL)enabled { + NNGSDKManager.shared.canWriteFeedByScreenshot = enabled; +} + + +- (void)setGameId:(NSString *)gameId { + [NNGSDKManager.shared registerMemberGameId:gameId]; +} + + - (void)startHome { [NNGSDKManager.shared presentBannerViewController]; } @@ -103,11 +140,6 @@ FString FIOSNaverGLink::GetCountryCode() const } -- (void)finishSdk { - [NNGSDKManager.shared dismiss]; -} - - - (void)startBoardWithBoardId:(NSNumber *)boardId { [NNGSDKManager.shared presentBoardViewControllerWith:boardId]; } @@ -118,8 +150,13 @@ FString FIOSNaverGLink::GetCountryCode() const } -- (NSString *)countryCode { - return NNGSDKManager.shared.countryCode; +- (void)startFeedWritingWithBoardId:(NSNumber *)boardId title:(NSString *)title text:(NSString *)text imageFilePath:(NSString *)imageFilePath { + [NNGSDKManager.shared presentFeedWritingWithBoardId:boardId title:title text:text imageFilePath:imageFilePath]; +} + + +- (void)finishSdk { + [NNGSDKManager.shared dismiss]; } diff --git a/sample/unreal-sample-4.23.1/Plugins/NaverGameSdk/Source/NaverGameSdk/Private/IOS/IOSNaverGLink.h b/sample/unreal-sample-4.23.1/Plugins/NaverGameSdk/Source/NaverGameSdk/Private/IOS/IOSNaverGLink.h index da49d83..787bafd 100644 --- a/sample/unreal-sample-4.23.1/Plugins/NaverGameSdk/Source/NaverGameSdk/Private/IOS/IOSNaverGLink.h +++ b/sample/unreal-sample-4.23.1/Plugins/NaverGameSdk/Source/NaverGameSdk/Private/IOS/IOSNaverGLink.h @@ -20,17 +20,22 @@ class FIOSNaverGLink : public INaverGLink public: FIOSNaverGLink(); + FString GetCountryCode() const; + void Init(FString ClientId, FString ClientSecret, FString LoungeId) const; + void SetCanWriteFeedByScreenshot(bool Enabled) const; + void SetGameId(FString GameId) const; void StartHome() const; void StartSorry() const; - void FinishSdk() const; - void StartBoard(int BoardId) const; + void StartFeed(int FeedId, bool IsTempFeedId) const; - FString GetCountryCode() const; + void StartFeedWriting(int BoardId, FString Title, FString Text, FString ImageFilePath) const; + + void FinishSdk() const; }; @@ -39,16 +44,22 @@ class FIOSNaverGLink : public INaverGLink @property (class, nonatomic, readonly) NaverGLinkCallbackObject *shared; +@property (nonatomic, readonly) NSString *countryCode; + + - (void)setClientId:(NSString *)clientId clientSecret:(NSString *)clientSecret loungeId:(NSString *)loungeId; +- (void)setCanWriteFeedByScreenshot:(BOOL)enabled; +- (void)setGameId:(NSString *)gameId; - (void)startHome; - (void)startSorry; -- (void)finishSdk; - - (void)startBoardWithBoardId:(NSNumber *)boardId; + - (void)startFeedWithFeedId:(NSNumber *)feedId tempFeedId:(BOOL)tempFeedId; -@property (nonatomic, readonly) NSString *countryCode; +- (void)startFeedWritingWithBoardId:(NSNumber *)boardId title:(NSString *)title text:(NSString *)text imageFilePath:(NSString *)imageFilePath; + +- (void)finishSdk; @end diff --git a/sample/unreal-sample-4.23.1/Plugins/NaverGameSdk/Source/NaverGameSdk/Private/NaverGLink.h b/sample/unreal-sample-4.23.1/Plugins/NaverGameSdk/Source/NaverGameSdk/Private/NaverGLink.h index 45c2fbc..d4aaacd 100644 --- a/sample/unreal-sample-4.23.1/Plugins/NaverGameSdk/Source/NaverGameSdk/Private/NaverGLink.h +++ b/sample/unreal-sample-4.23.1/Plugins/NaverGameSdk/Source/NaverGameSdk/Private/NaverGLink.h @@ -19,6 +19,9 @@ class INaverGLink virtual void StartBoard(int BoardId) const = 0; virtual void StartFeed(int FeedId, bool IsTempFeedId) const = 0; virtual FString GetCountryCode() const = 0; + virtual void SetCanWriteFeedByScreenshot(bool Enabled) const = 0; + virtual void SetGameId(FString GameId) const = 0; + virtual void StartFeedWriting(int BoardId, FString Title, FString Text, FString ImageFilePath) const = 0; }; diff --git a/sample/unreal-sample-4.23.1/Plugins/NaverGameSdk/Source/NaverGameSdk/Public/GLink.h b/sample/unreal-sample-4.23.1/Plugins/NaverGameSdk/Source/NaverGameSdk/Public/GLink.h index 8fc704d..480ee78 100644 --- a/sample/unreal-sample-4.23.1/Plugins/NaverGameSdk/Source/NaverGameSdk/Public/GLink.h +++ b/sample/unreal-sample-4.23.1/Plugins/NaverGameSdk/Source/NaverGameSdk/Public/GLink.h @@ -34,5 +34,14 @@ class NAVERGAMESDK_API UGLink : public UBlueprintFunctionLibrary UFUNCTION(BlueprintCallable, Category = "Naver GameSdk") static FString GetCountryCode(); + + UFUNCTION(BlueprintCallable, Category = "Naver GameSdk") + static void SetCanWriteFeedByScreenshot(bool Enabled); + + UFUNCTION(BlueprintCallable, Category = "Naver GameSdk") + static void SetGameId(FString GameId); + + UFUNCTION(BlueprintCallable, Category = "Naver GameSdk") + static void ExecuteFeedWriting(int BoardId, FString Title, FString Text, FString ImageFilePath); }; diff --git a/sample/unreal-sample-4.23.1/Plugins/NaverGameSdk/Source/NaverGameSdk/ThirdPartyFrameworks/Android/navergame-sdk-gradle-1.1.3.aar b/sample/unreal-sample-4.23.1/Plugins/NaverGameSdk/Source/NaverGameSdk/ThirdPartyFrameworks/Android/navergame-sdk-gradle-1.1.3.aar deleted file mode 100644 index b71b092..0000000 Binary files a/sample/unreal-sample-4.23.1/Plugins/NaverGameSdk/Source/NaverGameSdk/ThirdPartyFrameworks/Android/navergame-sdk-gradle-1.1.3.aar and /dev/null differ diff --git a/sample/unreal-sample-4.23.1/Plugins/NaverGameSdk/Source/NaverGameSdk/ThirdPartyFrameworks/Android/navergame-sdk-gradle-1.2.0.aar b/sample/unreal-sample-4.23.1/Plugins/NaverGameSdk/Source/NaverGameSdk/ThirdPartyFrameworks/Android/navergame-sdk-gradle-1.2.0.aar new file mode 100644 index 0000000..e2ed603 Binary files /dev/null and b/sample/unreal-sample-4.23.1/Plugins/NaverGameSdk/Source/NaverGameSdk/ThirdPartyFrameworks/Android/navergame-sdk-gradle-1.2.0.aar differ diff --git a/sample/unreal-sample-4.23.1/Plugins/NaverGameSdk/Source/NaverGameSdk/ThirdPartyFrameworks/iOS/NNGSDK.embeddedframework.zip b/sample/unreal-sample-4.23.1/Plugins/NaverGameSdk/Source/NaverGameSdk/ThirdPartyFrameworks/iOS/NNGSDK.embeddedframework.zip index 265055a..34c832c 100644 Binary files a/sample/unreal-sample-4.23.1/Plugins/NaverGameSdk/Source/NaverGameSdk/ThirdPartyFrameworks/iOS/NNGSDK.embeddedframework.zip and b/sample/unreal-sample-4.23.1/Plugins/NaverGameSdk/Source/NaverGameSdk/ThirdPartyFrameworks/iOS/NNGSDK.embeddedframework.zip differ diff --git a/sample/unreal-sample-4.23.1/Plugins/NaverGameSdk/Source/NaverGameSdk/ThirdPartyFrameworks/iOS/NaverLogin.embeddedframework.zip b/sample/unreal-sample-4.23.1/Plugins/NaverGameSdk/Source/NaverGameSdk/ThirdPartyFrameworks/iOS/NaverLogin.embeddedframework.zip new file mode 100644 index 0000000..8f9bce1 Binary files /dev/null and b/sample/unreal-sample-4.23.1/Plugins/NaverGameSdk/Source/NaverGameSdk/ThirdPartyFrameworks/iOS/NaverLogin.embeddedframework.zip differ diff --git a/sample/unreal-sample-4.26.2/.gitignore b/sample/unreal-sample-4.26.2/.gitignore new file mode 100644 index 0000000..9ddb9ea --- /dev/null +++ b/sample/unreal-sample-4.26.2/.gitignore @@ -0,0 +1,147 @@ +# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider +# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 + +# User-specific stuff +.idea/**/workspace.xml +.idea/**/tasks.xml +.idea/**/usage.statistics.xml +.idea/**/dictionaries +.idea/**/shelf + +# Generated files +.idea/**/contentModel.xml + +# Sensitive or high-churn files +.idea/**/dataSources/ +.idea/**/dataSources.ids +.idea/**/dataSources.local.xml +.idea/**/sqlDataSources.xml +.idea/**/dynamic.xml +.idea/**/uiDesigner.xml +.idea/**/dbnavigator.xml + +# Gradle +.idea/**/gradle.xml +.idea/**/libraries + +# Gradle and Maven with auto-import +# When using Gradle or Maven with auto-import, you should exclude module files, +# since they will be recreated, and may cause churn. Uncomment if using +# auto-import. +# .idea/artifacts +# .idea/compiler.xml +# .idea/jarRepositories.xml +# .idea/modules.xml +# .idea/*.iml +# .idea/modules +# *.iml +# *.ipr + +# CMake +cmake-build-*/ + +# Mongo Explorer plugin +.idea/**/mongoSettings.xml + +# File-based project format +*.iws + +# IntelliJ +out/ + +# mpeltonen/sbt-idea plugin +.idea_modules/ + +# JIRA plugin +atlassian-ide-plugin.xml + +# Cursive Clojure plugin +.idea/replstate.xml + +# Crashlytics plugin (for Android Studio and IntelliJ) +com_crashlytics_export_strings.xml +crashlytics.properties +crashlytics-build.properties +fabric.properties + +# Editor-based Rest Client +.idea/httpRequests + +# Android studio 3.1+ serialized cache file +.idea/caches/build_file_checksums.ser + + +# Visual Studio 2015 user specific files +.vs/ + +# Compiled Object files +*.slo +*.lo +*.o +*.obj + +# Precompiled Headers +*.gch +*.pch + +# Compiled Dynamic libraries +*.so +*.dylib +*.dll + +# Fortran module files +*.mod + +# Compiled Static libraries +*.lai +*.la +*.a +*.lib + +# Executables +*.exe +*.out +*.app +*.ipa + +# These project files can be generated by the engine +*.xcodeproj +*.xcworkspace +*.sln +*.suo +*.opensdf +*.sdf +*.VC.db +*.VC.opendb + +# Precompiled Assets +SourceArt/**/*.png +SourceArt/**/*.tga + +# Binary Files +Binaries/* +Plugins/*/Binaries/* + +# Builds +Build/* + +# Whitelist PakBlacklist-.txt files +!Build/*/ +Build/*/** +!Build/*/PakBlacklist*.txt + +# Don't ignore icon files in Build +!Build/**/*.ico + +# Built data for maps +*_BuiltData.uasset + +# Configuration files generated by the Editor +Saved/* + +# Compiled source files for the engine to use +Intermediate/* +Plugins/*/Intermediate/* + +# Cache files for the editor to use +DerivedDataCache/* \ No newline at end of file diff --git a/sample/unreal-sample-4.26.2/Config/DefaultEditor.ini b/sample/unreal-sample-4.26.2/Config/DefaultEditor.ini new file mode 100644 index 0000000..e69de29 diff --git a/sample/unreal-sample-4.26.2/Config/DefaultEngine.ini b/sample/unreal-sample-4.26.2/Config/DefaultEngine.ini new file mode 100644 index 0000000..16a1c59 --- /dev/null +++ b/sample/unreal-sample-4.26.2/Config/DefaultEngine.ini @@ -0,0 +1,257 @@ + + +[/Script/EngineSettings.GameMapsSettings] +EditorStartupMap=/Engine/Maps/Templates/Template_Default.Template_Default +LocalMapOptions= +TransitionMap=None +bUseSplitscreen=False +TwoPlayerSplitscreenLayout=Horizontal +ThreePlayerSplitscreenLayout=FavorTop +FourPlayerSplitscreenLayout=Grid +bOffsetPlayerGamepadIds=False +GameInstanceClass=/Script/Engine.GameInstance +GameDefaultMap=/Engine/Maps/Templates/Template_Default.Template_Default +ServerDefaultMap=/Engine/Maps/Entry.Entry +GlobalDefaultGameMode=/Script/Engine.GameModeBase +GlobalDefaultServerGameMode=None + +[/Script/HardwareTargeting.HardwareTargetingSettings] +TargetedHardwareClass=Mobile +AppliedTargetedHardwareClass=Mobile +DefaultGraphicsPerformance=Scalable +AppliedDefaultGraphicsPerformance=Scalable + +[/Script/Engine.Engine] ++ActiveGameNameRedirects=(OldGameName="TP_BlankBP",NewGameName="/Script/UE_4_26_2") ++ActiveGameNameRedirects=(OldGameName="/Script/TP_BlankBP",NewGameName="/Script/UE_4_26_2") + +[/Script/Engine.RendererSettings] +r.Mobile.DisableVertexFog=True +r.Shadow.CSM.MaxMobileCascades=2 +r.MobileMSAA=1 +r.Mobile.AllowDitheredLODTransition=False +r.Mobile.AllowSoftwareOcclusion=False +r.Mobile.VirtualTextures=False +r.DiscardUnusedQuality=False +r.AllowOcclusionQueries=True +r.MinScreenRadiusForLights=0.030000 +r.MinScreenRadiusForDepthPrepass=0.030000 +r.MinScreenRadiusForCSMDepth=0.010000 +r.PrecomputedVisibilityWarning=False +r.TextureStreaming=True +Compat.UseDXT5NormalMaps=False +r.VirtualTextures=False +r.VirtualTexturedLightmaps=False +r.VT.TileSize=128 +r.VT.TileBorderSize=4 +r.vt.FeedbackFactor=16 +r.VT.EnableCompressZlib=True +r.VT.EnableCompressCrunch=False +r.ClearCoatNormal=False +r.ReflectionCaptureResolution=128 +r.Mobile.ReflectionCaptureCompression=False +r.ReflectionEnvironmentLightmapMixBasedOnRoughness=True +r.ForwardShading=False +r.VertexFoggingForOpaque=True +r.AllowStaticLighting=True +r.NormalMapsForStaticLighting=False +r.GenerateMeshDistanceFields=False +r.DistanceFieldBuild.EightBit=False +r.GenerateLandscapeGIData=False +r.DistanceFieldBuild.Compress=False +r.TessellationAdaptivePixelsPerTriangle=48.000000 +r.SeparateTranslucency=False +r.TranslucentSortPolicy=0 +TranslucentSortAxis=(X=0.000000,Y=-1.000000,Z=0.000000) +r.CustomDepth=1 +r.CustomDepthTemporalAAJitter=True +r.PostProcessing.PropagateAlpha=0 +r.DefaultFeature.Bloom=False +r.DefaultFeature.AmbientOcclusion=False +r.DefaultFeature.AmbientOcclusionStaticFraction=True +r.DefaultFeature.AutoExposure=False +r.DefaultFeature.AutoExposure.Method=0 +r.DefaultFeature.AutoExposure.Bias=1.000000 +r.DefaultFeature.AutoExposure.ExtendDefaultLuminanceRange=False +r.UsePreExposure=True +r.EyeAdaptation.EditorOnly=False +r.DefaultFeature.MotionBlur=False +r.DefaultFeature.LensFlare=False +r.TemporalAA.Upsampling=False +r.SSGI.Enable=False +r.DefaultFeature.AntiAliasing=0 +r.DefaultFeature.LightUnits=1 +r.DefaultBackBufferPixelFormat=4 +r.Shadow.UnbuiltPreviewInGame=True +r.StencilForLODDither=False +r.EarlyZPass=3 +r.EarlyZPassOnlyMaterialMasking=False +r.DBuffer=True +r.ClearSceneMethod=1 +r.BasePassOutputsVelocity=False +r.VertexDeformationOutputsVelocity=False +r.SelectiveBasePassOutputs=False +bDefaultParticleCutouts=False +fx.GPUSimulationTextureSizeX=1024 +fx.GPUSimulationTextureSizeY=1024 +r.AllowGlobalClipPlane=False +r.GBufferFormat=1 +r.MorphTarget.Mode=True +r.GPUCrashDebugging=False +vr.InstancedStereo=False +r.MobileHDR=True +vr.MobileMultiView=False +r.Mobile.UseHWsRGBEncoding=False +vr.RoundRobinOcclusion=False +vr.ODSCapture=False +r.MeshStreaming=False +r.WireframeCullThreshold=5.000000 +r.RayTracing=False +r.RayTracing.UseTextureLod=False +r.SupportStationarySkylight=True +r.SupportLowQualityLightmaps=True +r.SupportPointLightWholeSceneShadows=True +r.SupportAtmosphericFog=True +r.SupportSkyAtmosphere=True +r.SupportSkyAtmosphereAffectsHeightFog=False +r.SkinCache.CompileShaders=False +r.SkinCache.DefaultBehavior=1 +r.SkinCache.SceneMemoryLimitInMB=128.000000 +r.Mobile.EnableStaticAndCSMShadowReceivers=True +r.Mobile.EnableMovableLightCSMShaderCulling=True +r.Mobile.AllowDistanceFieldShadows=True +r.Mobile.AllowMovableDirectionalLights=True +r.MobileNumDynamicPointLights=4 +r.MobileDynamicPointLightsUseStaticBranch=True +r.Mobile.EnableMovableSpotlights=False +r.Mobile.EnableMovableSpotlightsShadow=False +r.GPUSkin.Support16BitBoneIndex=False +r.GPUSkin.Limit2BoneInfluences=False +r.SupportDepthOnlyIndexBuffers=True +r.SupportReversedIndexBuffers=True +r.LightPropagationVolume=False +r.Mobile.AmbientOcclusion=False +r.GPUSkin.UnlimitedBoneInfluences=False +r.GPUSkin.UnlimitedBoneInfluencesThreshold=8 +r.Mobile.PlanarReflectionMode=0 +bStreamSkeletalMeshLODs=(Default=False,PerPlatform=()) +bDiscardSkeletalMeshOptionalLODs=(Default=False,PerPlatform=()) +VisualizeCalibrationColorMaterialPath=None +VisualizeCalibrationCustomMaterialPath=None +VisualizeCalibrationGrayscaleMaterialPath=None + +[/Script/Slate.SlateSettings] +bExplicitCanvasChildZOrder=True + +[/Script/AndroidRuntimeSettings.AndroidRuntimeSettings] +PackageName=com.navercorp.navergamesdk.sample.unreal +StoreVersion=1 +StoreVersionOffsetArmV7=0 +StoreVersionOffsetArm64=0 +StoreVersionOffsetX8664=0 +ApplicationDisplayName= +VersionDisplayName=1.0 +MinSDKVersion=19 +TargetSDKVersion=29 +InstallLocation=InternalOnly +bEnableGradle=True +bEnableLint=False +bPackageDataInsideApk=False +bCreateAllPlatformsInstall=False +bDisableVerifyOBBOnStartUp=False +bForceSmallOBBFiles=False +bAllowLargeOBBFiles=False +bAllowPatchOBBFile=False +bAllowOverflowOBBFiles=False +bUseExternalFilesDir=False +bPublicLogFiles=True +Orientation=SensorLandscape +MaxAspectRatio=2.100000 +bUseDisplayCutout=False +bRestoreNotificationsOnReboot=False +bFullScreen=True +bEnableNewKeyboard=True +DepthBufferPreference=Default +bValidateTextureFormats=True +bEnableBundle=False +bEnableUniversalAPK=True +bBundleABISplit=True +bBundleLanguageSplit=True +bBundleDensitySplit=True ++ExtraApplicationNodeTags=android:requestLegacyExternalStorage="true" +ExtraApplicationSettings= +ExtraActivitySettings= +bAndroidVoiceEnabled=False +bRemoveOSIG=False ++GoogleVRCaps=Daydream33 +bGoogleVRSustainedPerformance=False +KeyStore= +KeyAlias= +KeyStorePassword= +KeyPassword= +bBuildForArmV7=True +bBuildForArm64=False +bBuildForX8664=False +bBuildForES31=True +bSupportsVulkan=False +bSupportsVulkanSM5=False +bAndroidOpenGLSupportsBackbufferSampling=False +bDetectVulkanByDefault=True +bBuildWithHiddenSymbolVisibility=False +bSaveSymbols=False +bForceLDLinker=False +bEnableGooglePlaySupport=False +bUseGetAccounts=False +GamesAppID= +bEnableSnapshots=False +bSupportAdMob=True +AdMobAdUnitID= +GooglePlayLicenseKey= +GCMClientSenderID= +bShowLaunchImage=True +bAllowIMU=True +bAllowControllers=True +bBlockAndroidKeysOnControllers=False +bControllersBlockDeviceFeedback=False +AndroidAudio=Default +AudioSampleRate=44100 +AudioCallbackBufferFrameSize=1024 +AudioNumBuffersToEnqueue=4 +AudioMaxChannels=0 +AudioNumSourceWorkers=0 +SpatializationPlugin= +ReverbPlugin= +OcclusionPlugin= +CompressionOverrides=(bOverrideCompressionTimes=False,DurationThreshold=5.000000,MaxNumRandomBranches=0,SoundCueQualityIndex=0) +bUseAudioStreamCaching=False +CacheSizeKB=0 +MaxChunkSizeOverrideKB=0 +bResampleForDevice=False +SoundCueCookQualityIndex=-1 +MaxSampleRate=0.000000 +HighSampleRate=0.000000 +MedSampleRate=0.000000 +LowSampleRate=0.000000 +MinSampleRate=0.000000 +CompressionQualityModifier=0.000000 +AutoStreamingThreshold=0.000000 +AndroidGraphicsDebugger=None +MaliGraphicsDebuggerPath=(Path="") +bMultiTargetFormat_ETC2=True +bMultiTargetFormat_DXT=True +bMultiTargetFormat_ASTC=True +TextureFormatPriority_ETC2=0.200000 +TextureFormatPriority_DXT=0.600000 +TextureFormatPriority_ASTC=0.900000 +SDKAPILevelOverride= +NDKAPILevelOverride= +bStreamLandscapeMeshLODs=False + +[/Script/IOSRuntimeSettings.IOSRuntimeSettings] +BundleIdentifier=com.navercorp.nngsdk.unrealDev +SigningCertificate=Apple Development: Cheolwoo Baek (GQ8MU9QRAQ) +MobileProvision=NNG_SDK_Sample_Unreal_Dev_for_Dev.mobileprovision +AdditionalLinkerFlags=-ObjC -lc++ +AdditionalShippingLinkerFlags=-ObjC -lc++ +AdditionalPlistData=CFBundleURLTypes CFBundleURLSchemes gLinkSample NSAppTransportSecurityNSAllowsArbitraryLoads LSApplicationQueriesSchemesnaversearchappnaversearchthirdlogin CFBundleURLTypesCFBundleTypeRoleEditorCFBundleURLSchemesnngsdksampleNSPhotoLibraryUsageDescriptionAccess your photos to create a post. + diff --git a/sample/unreal-sample-4.26.2/Config/DefaultGame.ini b/sample/unreal-sample-4.26.2/Config/DefaultGame.ini new file mode 100644 index 0000000..5f981df --- /dev/null +++ b/sample/unreal-sample-4.26.2/Config/DefaultGame.ini @@ -0,0 +1,4 @@ + + +[/Script/EngineSettings.GeneralProjectSettings] +ProjectID=585A6054F64D7F8E987C598D24C75E5D diff --git a/sample/unreal-sample-4.26.2/Content/NewMap.umap b/sample/unreal-sample-4.26.2/Content/NewMap.umap new file mode 100644 index 0000000..5214099 Binary files /dev/null and b/sample/unreal-sample-4.26.2/Content/NewMap.umap differ diff --git a/sample/unreal-sample-4.26.2/Plugins/NaverGameSdk/Config/FilterPlugin.ini b/sample/unreal-sample-4.26.2/Plugins/NaverGameSdk/Config/FilterPlugin.ini new file mode 100644 index 0000000..ccebca2 --- /dev/null +++ b/sample/unreal-sample-4.26.2/Plugins/NaverGameSdk/Config/FilterPlugin.ini @@ -0,0 +1,8 @@ +[FilterPlugin] +; This section lists additional files which will be packaged along with your plugin. Paths should be listed relative to the root plugin directory, and +; may include "...", "*", and "?" wildcards to match directories, files, and individual characters respectively. +; +; Examples: +; /README.txt +; /Extras/... +; /Binaries/ThirdParty/*.dll diff --git a/sample/unreal-sample-4.26.2/Plugins/NaverGameSdk/Content/mainMenu.uasset b/sample/unreal-sample-4.26.2/Plugins/NaverGameSdk/Content/mainMenu.uasset new file mode 100644 index 0000000..461cffb Binary files /dev/null and b/sample/unreal-sample-4.26.2/Plugins/NaverGameSdk/Content/mainMenu.uasset differ diff --git a/sample/unreal-sample-4.26.2/Plugins/NaverGameSdk/NaverGameSdk.uplugin b/sample/unreal-sample-4.26.2/Plugins/NaverGameSdk/NaverGameSdk.uplugin new file mode 100644 index 0000000..c118662 --- /dev/null +++ b/sample/unreal-sample-4.26.2/Plugins/NaverGameSdk/NaverGameSdk.uplugin @@ -0,0 +1,30 @@ +{ + "FileVersion": 3, + "Version": 1, + "VersionName": "1.2.0", + "FriendlyName": "NaverGameSdk", + "Description": "naver game sdk", + "Category": "Other", + "CreatedBy": "navercorp", + "CreatedByURL": "", + "DocsURL": "", + "MarketplaceURL": "", + "SupportURL": "", + "EngineVersion": "4.26.0", + "CanContainContent": true, + "Installed": true, + "Modules": [ + { + "Name": "NaverGameSdk", + "Type": "Runtime", + "LoadingPhase": "Default", + "WhitelistPlatforms": [ + "Mac", + "Android", + "IOS", + "Win64", + "Win32" + ] + } + ] +} \ No newline at end of file diff --git a/sample/unreal-sample-4.26.2/Plugins/NaverGameSdk/Resources/Icon128.png b/sample/unreal-sample-4.26.2/Plugins/NaverGameSdk/Resources/Icon128.png new file mode 100644 index 0000000..1231d4a Binary files /dev/null and b/sample/unreal-sample-4.26.2/Plugins/NaverGameSdk/Resources/Icon128.png differ diff --git a/sample/unreal-sample-4.26.2/Plugins/NaverGameSdk/Source/NaverGameSdk/NaverGameSdk.Build.cs b/sample/unreal-sample-4.26.2/Plugins/NaverGameSdk/Source/NaverGameSdk/NaverGameSdk.Build.cs new file mode 100644 index 0000000..73a7102 --- /dev/null +++ b/sample/unreal-sample-4.26.2/Plugins/NaverGameSdk/Source/NaverGameSdk/NaverGameSdk.Build.cs @@ -0,0 +1,103 @@ + +using System.IO; +using UnrealBuildTool; + +public class NaverGameSdk : ModuleRules +{ + + private string ThirdPartyPath + { + get { return Path.GetFullPath(Path.Combine(ModuleDirectory, "./ThirdPartyFrameworks/")); } + } + + public NaverGameSdk(ReadOnlyTargetRules Target) : base(Target) + { + PrivatePCHHeaderFile = "Private/NaverGameSdkPrivatePCH.h"; + PublicIncludePaths.AddRange( + new string[] + { + "NaverGameSdk/Public" + // ... add public include paths required here ... + } + ); + + + PrivateIncludePaths.AddRange( + new string[] + { + "NaverGameSdk/Private" + // ... add other private include paths required here ... + } + ); + + PublicDependencyModuleNames.AddRange( + new string[] + { + "Engine", + "Core", + "CoreUObject", + "Slate", + "SlateCore", + "UMG" + } + ); + + PrivateDependencyModuleNames.AddRange( + new string[] + { + // ... add private dependencies that you statically link with here ... + } + ); + + DynamicallyLoadedModuleNames.AddRange( + new string[] + { + // ... add any modules that your module loads dynamically here ... + } + ); + + if (Target.Platform == UnrealTargetPlatform.Android) + { + string PluginPath = Utils.MakePathRelativeTo(ModuleDirectory, Target.RelativeEnginePath); + AdditionalPropertiesForReceipt.Add("AndroidPlugin", Path.Combine(PluginPath, "NaverGameSdk_UPL.xml")); + } + + if (Target.Platform == UnrealTargetPlatform.IOS) + { + // Add framework + PublicAdditionalFrameworks.Add( + new Framework( + "NNGSDK", + "./ThirdPartyFrameworks/iOS/NNGSDK.embeddedframework.zip", + "Resources/NNGSDK.bundle" + ) + ); + + PublicAdditionalFrameworks.Add( + new Framework( + "NaverLogin", + "./ThirdPartyFrameworks/iOS/NaverLogin.embeddedframework.zip" + ) + ); + + bEnableObjCExceptions = false; + + PublicFrameworks.AddRange( + new string[] + { + "UIKit", + "Foundation", + "MediaPlayer", + "SystemConfiguration", + "Security", + "MobileCoreServices", + "GameKit", + "AssetsLibrary", + "WebKit", + "SafariServices" + } + ); + } + } + +} diff --git a/sample/unreal-sample-4.26.2/Plugins/NaverGameSdk/Source/NaverGameSdk/NaverGameSdk_UPL.xml b/sample/unreal-sample-4.26.2/Plugins/NaverGameSdk/Source/NaverGameSdk/NaverGameSdk_UPL.xml new file mode 100644 index 0000000..b4fe097 --- /dev/null +++ b/sample/unreal-sample-4.26.2/Plugins/NaverGameSdk/Source/NaverGameSdk/NaverGameSdk_UPL.xml @@ -0,0 +1,100 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -keep class com.navercorp.nng.android.sdk.NngNdkWrapper** { *; } + + + + + + allprojects { + def mappings = [ + 'android.support.annotation': 'androidx.annotation', + 'android.arch.lifecycle': 'androidx.lifecycle', + 'android.support.v4.app.NotificationCompat': 'androidx.core.app.NotificationCompat', + 'android.support.v4.app.ActivityCompat': 'androidx.core.app.ActivityCompat', + 'android.support.v4.content.ContextCompat': 'androidx.core.content.ContextCompat', + 'android.support.v13.app.FragmentCompat': 'androidx.legacy.app.FragmentCompat', + 'android.arch.lifecycle.Lifecycle': 'androidx.lifecycle.Lifecycle', + 'android.arch.lifecycle.LifecycleObserver': 'androidx.lifecycle.LifecycleObserver', + 'android.arch.lifecycle.OnLifecycleEvent': 'androidx.lifecycle.OnLifecycleEvent', + 'android.arch.lifecycle.ProcessLifecycleOwner': 'androidx.lifecycle.ProcessLifecycleOwner', + 'android.support.v4.app.NotificationManagerCompat' : 'androidx.core.app.NotificationManagerCompat', + 'android.support.v4.content.FileProvider' : 'androidx.core.content.FileProvider' + ] + + beforeEvaluate { project -> + project.rootProject.projectDir.traverse(type: groovy.io.FileType.FILES, nameFilter: ~/.*\.java$/) { f -> + mappings.each { entry -> + if (f.getText('UTF-8').contains(entry.key)) { + println "Updating ${entry.key} to ${entry.value} in file ${f}" + ant.replace(file: f, token: entry.key, value: entry.value) + } + } + } + } + } + + + + + + android.useAndroidX=true + android.enableJetifier=true + + + + + + android { + compileOptions { + sourceCompatibility 1.8 + targetCompatibility 1.8 + } + } + + + + + + + dependencies { + + implementation files("libs/navergame-sdk-gradle-1.2.0.aar") // Navergame SDK + implementation "com.naver.nid:naveridlogin-android-sdk:4.2.6" //Naver Login SDK + implementation "org.jetbrains.kotlin:kotlin-stdlib:1.4.20" // Kotlin + implementation "androidx.viewpager2:viewpager2:1.0.0" // Viewpager2 + implementation "com.github.bumptech.glide:glide:3.7.0" // Glide + implementation "com.squareup.retrofit2:retrofit:2.9.0" // Retrofit2 + implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0" //SwipeRefreshLayout + implementation "com.squareup.retrofit2:converter-gson:2.9.0" + } + + + + \ No newline at end of file diff --git a/sample/unreal-sample-4.26.2/Plugins/NaverGameSdk/Source/NaverGameSdk/Private/Android/AndroidNaverGLink.cpp b/sample/unreal-sample-4.26.2/Plugins/NaverGameSdk/Source/NaverGameSdk/Private/Android/AndroidNaverGLink.cpp new file mode 100644 index 0000000..b886e81 --- /dev/null +++ b/sample/unreal-sample-4.26.2/Plugins/NaverGameSdk/Source/NaverGameSdk/Private/Android/AndroidNaverGLink.cpp @@ -0,0 +1,186 @@ +#include "AndroidNaverGLink.h" +#include "NaverGameSdkPrivatePCH.h" +#include "Android/AndroidApplication.h" +#include "Android/AndroidJava.h" +#include "Runtime/Launch/Public/Android/AndroidJNI.h" + +FAndroidNaverGLink::FAndroidNaverGLink() +{ + if (JNIEnv * Env = FAndroidApplication::GetJavaEnv()) + { + jclass localGlinkClass = FAndroidApplication::FindJavaClass("com.navercorp.nng.android.sdk.NngNdkWrapper"); + Method_Init = FJavaWrapper::FindStaticMethod(Env, localGlinkClass, "initModule", "(Landroid/app/Activity;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V", false); + Method_FinishSdk = FJavaWrapper::FindStaticMethod(Env, localGlinkClass, "finishSdk", "()V", false); + Method_StartHome = FJavaWrapper::FindStaticMethod(Env, localGlinkClass, "startHome", "(Landroid/app/Activity;)V", false); + Method_StartSorry = FJavaWrapper::FindStaticMethod(Env, localGlinkClass, "startSorry", "(Landroid/app/Activity;)V", false); + Method_StartBoard = FJavaWrapper::FindStaticMethod(Env, localGlinkClass, "startBoard", "(Landroid/app/Activity;I)V", false); + Method_StartFeed = FJavaWrapper::FindStaticMethod(Env, localGlinkClass, "startFeed", "(Landroid/app/Activity;IZ)V", false); + Method_GetCountryCode = FJavaWrapper::FindStaticMethod(Env, localGlinkClass,"getCountryCode", "(Landroid/app/Activity;)Ljava/lang/String;", false); + + Method_SetCanWriteFeedByScreenshot = FJavaWrapper::FindStaticMethod(Env, localGlinkClass, "setEnableScreenShot", "(Z)V", false); + Method_StartFeedWriting = FJavaWrapper::FindStaticMethod(Env, localGlinkClass, "writeFeed", "(Landroid/app/Activity;ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;)V", false); + Method_SetGameId = FJavaWrapper::FindStaticMethod(Env, localGlinkClass, "setGameId", "(Landroid/app/Activity;Ljava/lang/String;)V", false); + + Env->DeleteLocalRef(localGlinkClass); + } +} + + + +FString FAndroidNaverGLink::GetCountryCode() const +{ + if (JNIEnv * Env = FAndroidApplication::GetJavaEnv()) + { + jstring countryCodeJstr = nullptr; + jclass localGlinkClass = FAndroidApplication::FindJavaClass("com.navercorp.nng.android.sdk.NngNdkWrapper"); + countryCodeJstr = (jstring)Env->CallStaticObjectMethod(localGlinkClass, Method_GetCountryCode, FJavaWrapper::GameActivityThis); + Env->DeleteLocalRef(localGlinkClass); + + const char* CountryCodeChars = Env->GetStringUTFChars(countryCodeJstr, 0); + FString countryCode = UTF8_TO_TCHAR(CountryCodeChars); + Env->ReleaseStringUTFChars(countryCodeJstr, CountryCodeChars); + + return countryCode; + } + return ""; +} + +void FAndroidNaverGLink::Init(FString ClientId, FString ClientSecret, FString LoungeId) const +{ + if (JNIEnv * Env = FAndroidApplication::GetJavaEnv()) + { + + jclass localGlinkClass = FAndroidApplication::FindJavaClass("com.navercorp.nng.android.sdk.NngNdkWrapper"); + + jstring LoungeIdJava = Env->NewStringUTF(TCHAR_TO_UTF8(*LoungeId)); + jstring ClientIdJava = Env->NewStringUTF(TCHAR_TO_UTF8(*ClientId)); + jstring ClientSecretJava = Env->NewStringUTF(TCHAR_TO_UTF8(*ClientSecret)); + + Env->CallStaticVoidMethod(localGlinkClass, Method_Init, FJavaWrapper::GameActivityThis,LoungeIdJava,ClientIdJava,ClientSecretJava); + + Env->DeleteLocalRef(LoungeIdJava); + Env->DeleteLocalRef(ClientIdJava); + Env->DeleteLocalRef(ClientSecretJava); + + Env->DeleteLocalRef(localGlinkClass); + } + +} + + + + +void FAndroidNaverGLink::SetGameId(FString GameId) const { + if (JNIEnv * Env = FAndroidApplication::GetJavaEnv()) + { + jclass localGlinkClass = FAndroidApplication::FindJavaClass("com.navercorp.nng.android.sdk.NngNdkWrapper"); + + jstring gameId = Env->NewStringUTF(TCHAR_TO_UTF8(*GameId)); + + Env->CallStaticVoidMethod(localGlinkClass, Method_SetGameId, FJavaWrapper::GameActivityThis,gameId); + + + Env->DeleteLocalRef(gameId); + Env->DeleteLocalRef(localGlinkClass); + } + +} + +void FAndroidNaverGLink::SetCanWriteFeedByScreenshot(bool Enabled) const { + if (JNIEnv * Env = FAndroidApplication::GetJavaEnv()) + { + jclass localGlinkClass = FAndroidApplication::FindJavaClass("com.navercorp.nng.android.sdk.NngNdkWrapper"); + Env->CallStaticVoidMethod(localGlinkClass, Method_SetCanWriteFeedByScreenshot, Enabled); + Env->DeleteLocalRef(localGlinkClass); + } + +} + +void FAndroidNaverGLink::StartFeedWriting(int BoardId, FString Title, FString Text, FString ImageFilePath) const { + if (JNIEnv * Env = FAndroidApplication::GetJavaEnv()) + { + jclass localGlinkClass = FAndroidApplication::FindJavaClass("com.navercorp.nng.android.sdk.NngNdkWrapper"); + + jstring TitleJava = Env->NewStringUTF(TCHAR_TO_UTF8(*Title)); + jstring TextJava = Env->NewStringUTF(TCHAR_TO_UTF8(*Text)); + jstring ImagePathJava = Env->NewStringUTF(TCHAR_TO_UTF8(*ImageFilePath)); + + Env->CallStaticVoidMethod(localGlinkClass, Method_StartFeedWriting, FJavaWrapper::GameActivityThis,BoardId,TitleJava,TextJava,ImagePathJava); + + + Env->DeleteLocalRef(TitleJava); + Env->DeleteLocalRef(TextJava); + Env->DeleteLocalRef(ImagePathJava); + + Env->DeleteLocalRef(localGlinkClass); + + } + +} + + +void FAndroidNaverGLink::StartHome() const { + if (JNIEnv * Env = FAndroidApplication::GetJavaEnv()) + { + jclass localGlinkClass = FAndroidApplication::FindJavaClass("com.navercorp.nng.android.sdk.NngNdkWrapper"); + Env->CallStaticVoidMethod(localGlinkClass, Method_StartHome, FJavaWrapper::GameActivityThis); + Env->DeleteLocalRef(localGlinkClass); + } + +} + +void FAndroidNaverGLink::StartSorry() const { +if (JNIEnv * Env = FAndroidApplication::GetJavaEnv()) + { + jclass localGlinkClass = FAndroidApplication::FindJavaClass("com.navercorp.nng.android.sdk.NngNdkWrapper"); + Env->CallStaticVoidMethod(localGlinkClass, Method_StartSorry, FJavaWrapper::GameActivityThis); + Env->DeleteLocalRef(localGlinkClass); + } +} + +void FAndroidNaverGLink::StartBoard(int BoardId) const { +if (JNIEnv * Env = FAndroidApplication::GetJavaEnv()) + { + jclass localGlinkClass = FAndroidApplication::FindJavaClass("com.navercorp.nng.android.sdk.NngNdkWrapper"); + Env->CallStaticVoidMethod(localGlinkClass, Method_StartBoard, FJavaWrapper::GameActivityThis,BoardId); + Env->DeleteLocalRef(localGlinkClass); + } +} + +void FAndroidNaverGLink::StartFeed(int FeedId, bool IsTempFeedId) const { +if (JNIEnv * Env = FAndroidApplication::GetJavaEnv()) + { + jclass localGlinkClass = FAndroidApplication::FindJavaClass("com.navercorp.nng.android.sdk.NngNdkWrapper"); + Env->CallStaticVoidMethod(localGlinkClass, Method_StartFeed, FJavaWrapper::GameActivityThis,FeedId,IsTempFeedId); + Env->DeleteLocalRef(localGlinkClass); + } +} + +void FAndroidNaverGLink::FinishSdk() const { + if (JNIEnv * Env = FAndroidApplication::GetJavaEnv()) + { + jclass localGlinkClass = FAndroidApplication::FindJavaClass("com.navercorp.nng.android.sdk.NngNdkWrapper"); + Env->CallStaticVoidMethod(localGlinkClass, Method_FinishSdk); + Env->DeleteLocalRef(localGlinkClass); + } + +} + +extern "C" void Java_com_navercorp_nng_android_sdk_NngNdkWrapper_nngSdkLoaded(JNIEnv *env, jobject thisObj) { + FNaverGameSdkModule::OnSdkStarted.Broadcast(); + return; +} +extern "C" void Java_com_navercorp_nng_android_sdk_NngNdkWrapper_nngSdkUnLoaded(JNIEnv *env, jobject thisObj) { + FNaverGameSdkModule::OnSdkStopped.Broadcast(); + return; +} +extern "C" void Java_com_navercorp_nng_android_sdk_NngNdkWrapper_nngSdkCallInGameMenuCode(JNIEnv *env, jobject thisObj, jstring inGameMenuCode) +{ + const char* AppInGameMenuCodeChars = env->GetStringUTFChars(inGameMenuCode, 0); + + FString inGameMenuCodeString = UTF8_TO_TCHAR(AppInGameMenuCodeChars); + FNaverGameSdkModule::OnReceiveInGameMenuCode.Broadcast(inGameMenuCodeString); + + env->ReleaseStringUTFChars(inGameMenuCode, AppInGameMenuCodeChars); +} + diff --git a/sample/unreal-sample-4.26.2/Plugins/NaverGameSdk/Source/NaverGameSdk/Private/Android/AndroidNaverGLink.h b/sample/unreal-sample-4.26.2/Plugins/NaverGameSdk/Source/NaverGameSdk/Private/Android/AndroidNaverGLink.h new file mode 100644 index 0000000..20058b5 --- /dev/null +++ b/sample/unreal-sample-4.26.2/Plugins/NaverGameSdk/Source/NaverGameSdk/Private/Android/AndroidNaverGLink.h @@ -0,0 +1,42 @@ + + +#pragma once + +#include "Core.h" +#include "Android/AndroidJava.h" +#include "NaverGLink.h" +class FAndroidNaverGLink : public INaverGLink +{ + jmethodID Method_Init; + jmethodID Method_FinishSdk; + + jmethodID Method_StartHome; + jmethodID Method_StartSorry; + jmethodID Method_StartBoard; + jmethodID Method_StartFeed; + jmethodID Method_GetCountryCode; + + jmethodID Method_SetCanWriteFeedByScreenshot; + jmethodID Method_StartFeedWriting; + jmethodID Method_SetGameId; + + + +public: + FAndroidNaverGLink(); + ~FAndroidNaverGLink(); + FString GetCountryCode() const; + void Init(FString ClientId, FString ClientSecret, FString LoungeId) const; + void SetCanWriteFeedByScreenshot(bool Enabled) const; + void SetGameId(FString GameId) const; + + void StartHome() const; + void StartSorry() const; + void StartBoard(int BoardId) const; + void StartFeed(int FeedId, bool IsTempFeedId) const; + void StartFeedWriting(int BoardId, FString Title, FString Text, FString ImageFilePath) const; + + void FinishSdk() const; + + +}; diff --git a/sample/unreal-sample-4.26.2/Plugins/NaverGameSdk/Source/NaverGameSdk/Private/GLink.cpp b/sample/unreal-sample-4.26.2/Plugins/NaverGameSdk/Source/NaverGameSdk/Private/GLink.cpp new file mode 100644 index 0000000..f5f6f38 --- /dev/null +++ b/sample/unreal-sample-4.26.2/Plugins/NaverGameSdk/Source/NaverGameSdk/Private/GLink.cpp @@ -0,0 +1,61 @@ +// Fill out your copyright notice in the Description page of Project Settings. +#include "GLink.h" +#include "NaverGameSdkPrivatePCH.h" +#include "NaverGLink.h" + + +UGLink::UGLink(const FObjectInitializer& ObjectInitializer) +: Super(ObjectInitializer) +{ + // do nothing. +} + +void UGLink::Init(FString ClientId, FString ClientSecret, FString LoungeId) +{ + GetSharedSdk()->Init(ClientId, ClientSecret, LoungeId); +} + +void UGLink::ExecuteHomeBanner() +{ + GetSharedSdk()->StartHome(); +} + +void UGLink::ExecuteSorryBanner() +{ + GetSharedSdk()->StartSorry(); +} + +void UGLink::TerminateSdk() +{ + GetSharedSdk()->FinishSdk(); +} + +void UGLink::ExecuteBoard(int BoardId) +{ + GetSharedSdk()->StartBoard(BoardId); +} + +void UGLink::ExecuteFeed(int FeedId, bool IsTempFeedId) +{ + GetSharedSdk()->StartFeed(FeedId, IsTempFeedId); +} + +FString UGLink::GetCountryCode() +{ + return GetSharedSdk()->GetCountryCode(); +} + +void UGLink::SetCanWriteFeedByScreenshot(bool Enabled) +{ + GetSharedSdk()->SetCanWriteFeedByScreenshot(Enabled); +} + +void UGLink::SetGameId(FString GameId) +{ + GetSharedSdk()->SetGameId(GameId); +} + +void UGLink::ExecuteFeedWriting(int BoardId, FString Title, FString Text, FString ImageFilePath) +{ + GetSharedSdk()->StartFeedWriting(BoardId, Title, Text, ImageFilePath); +} diff --git a/sample/unreal-sample-4.26.2/Plugins/NaverGameSdk/Source/NaverGameSdk/Private/IOS/IOSNaverGLink.cpp b/sample/unreal-sample-4.26.2/Plugins/NaverGameSdk/Source/NaverGameSdk/Private/IOS/IOSNaverGLink.cpp new file mode 100644 index 0000000..57587ab --- /dev/null +++ b/sample/unreal-sample-4.26.2/Plugins/NaverGameSdk/Source/NaverGameSdk/Private/IOS/IOSNaverGLink.cpp @@ -0,0 +1,180 @@ +// NAVER Game SDK for iOS +// Copyright 2021-present NAVER Corp. +// +// Unauthorized use, modification and redistribution of this software are strongly prohibited. +// +// Created by Alan on 2021/05/14. + + +// Naver Game SDK Bridge Code for Unreal + + +#include "IOSNaverGLink.h" +#include "NaverGameSdkPrivatePCH.h" +#include "IOSAppDelegate.h" +#include "IOSView.h" + + +static void ListenNNGSDKOpenURL(UIApplication* application, NSURL* url, NSString* sourceApplication, id annotation) +{ + [NNGSDKManager.shared handleCallbackUrl:url]; +} + +FIOSNaverGLink::FIOSNaverGLink() +{ +} + +FString FIOSNaverGLink::GetCountryCode() const +{ + return UTF8_TO_TCHAR(NaverGLinkCallbackObject.shared.countryCode); +} + +void FIOSNaverGLink::Init(FString ClientId, FString ClientSecret, FString LoungeId) const +{ + [NaverGLinkCallbackObject.shared setClientId:ClientId.GetNSString() clientSecret:ClientSecret.GetNSString() loungeId:LoungeId.GetNSString()]; + FIOSCoreDelegates::OnOpenURL.AddStatic(&ListenNNGSDKOpenURL); +} + +void FIOSNaverGLink::SetCanWriteFeedByScreenshot(bool Enabled) const +{ + [NaverGLinkCallbackObject.shared setCanWriteFeedByScreenshot:Enabled]; +} + +void FIOSNaverGLink::SetGameId(FString GameId) const +{ + [NaverGLinkCallbackObject.shared setGameId:GameId.GetNSString()]; +} + +void FIOSNaverGLink::StartHome() const +{ + dispatch_async(dispatch_get_main_queue(), ^{ + [NaverGLinkCallbackObject.shared startHome]; + }); +} + +void FIOSNaverGLink::StartSorry() const +{ + dispatch_async(dispatch_get_main_queue(), ^{ + [NaverGLinkCallbackObject.shared startSorry]; + }); +} + +void FIOSNaverGLink::StartBoard(int BoardId) const +{ + dispatch_async(dispatch_get_main_queue(), ^{ + [NaverGLinkCallbackObject.shared startBoardWithBoardId:@(BoardId)]; + }); +} + +void FIOSNaverGLink::StartFeed(int FeedId, bool IsTempFeedId) const +{ + dispatch_async(dispatch_get_main_queue(), ^{ + [NaverGLinkCallbackObject.shared startFeedWithFeedId:@(FeedId) tempFeedId:IsTempFeedId]; + }); +} + +void FIOSNaverGLink::StartFeedWriting(int BoardId, FString Title, FString Text, FString ImageFilePath) const +{ + dispatch_async(dispatch_get_main_queue(), ^{ + [NaverGLinkCallbackObject.shared startFeedWritingWithBoardId:@(BoardId) title:Title.GetNSString() text:Text.GetNSString() imageFilePath:ImageFilePath.GetNSString()]; + }); +} + +void FIOSNaverGLink::FinishSdk() const +{ + dispatch_async(dispatch_get_main_queue(), ^{ + [NaverGLinkCallbackObject.shared finishSdk]; + }); +} + + +@implementation NaverGLinkCallbackObject + ++ (NaverGLinkCallbackObject *)shared { + static NaverGLinkCallbackObject *instance = nil; + static dispatch_once_t onceToken; + + dispatch_once(&onceToken, ^{ + instance = [[self alloc] init]; + }); + + [instance setParentViewController]; + + return instance; +} + + +- (NSString *)countryCode { + return NNGSDKManager.shared.countryCode; +} + + +- (void)setClientId:(NSString *)clientId clientSecret:(NSString *)clientSecret loungeId:(NSString *)loungeId { + [NNGSDKManager.shared setClientId:clientId clientSecret:clientSecret loungeId:loungeId]; +} + + +- (void)setParentViewController { + [NNGSDKManager.shared setParentViewController:[IOSAppDelegate GetDelegate].IOSController]; + NNGSDKManager.shared.delegate = self; +} + + +- (void)setCanWriteFeedByScreenshot:(BOOL)enabled { + NNGSDKManager.shared.canWriteFeedByScreenshot = enabled; +} + + +- (void)setGameId:(NSString *)gameId { + [NNGSDKManager.shared registerMemberGameId:gameId]; +} + + +- (void)startHome { + [NNGSDKManager.shared presentBannerViewController]; +} + + +- (void)startSorry { + [NNGSDKManager.shared presentSorryViewController]; +} + + +- (void)startBoardWithBoardId:(NSNumber *)boardId { + [NNGSDKManager.shared presentBoardViewControllerWith:boardId]; +} + + +- (void)startFeedWithFeedId:(NSNumber *)feedId tempFeedId:(BOOL)tempFeedId { + [NNGSDKManager.shared presentFeedViewControllerWith:feedId scheduled:tempFeedId]; +} + + +- (void)startFeedWritingWithBoardId:(NSNumber *)boardId title:(NSString *)title text:(NSString *)text imageFilePath:(NSString *)imageFilePath { + [NNGSDKManager.shared presentFeedWritingWithBoardId:boardId title:title text:text imageFilePath:imageFilePath]; +} + + +- (void)finishSdk { + [NNGSDKManager.shared dismiss]; +} + + +#pragma mark - NCSDKDelegate + +- (void)nngSDKDidLoad { + FNaverGameSdkModule::OnSdkStarted.Broadcast(); +} + + +- (void)nngSDKDidUnload { + FNaverGameSdkModule::OnSdkStopped.Broadcast(); +} + + +- (void)nngSDKDidReceiveInGameMenuCode:(NSString *)inGameMenuCode { + FString inGameMenuCodeString = UTF8_TO_TCHAR(inGameMenuCode); + FNaverGameSdkModule::OnReceiveInGameMenuCode.Broadcast(inGameMenuCodeString); +} + +@end diff --git a/sample/unreal-sample-4.26.2/Plugins/NaverGameSdk/Source/NaverGameSdk/Private/IOS/IOSNaverGLink.h b/sample/unreal-sample-4.26.2/Plugins/NaverGameSdk/Source/NaverGameSdk/Private/IOS/IOSNaverGLink.h new file mode 100644 index 0000000..787bafd --- /dev/null +++ b/sample/unreal-sample-4.26.2/Plugins/NaverGameSdk/Source/NaverGameSdk/Private/IOS/IOSNaverGLink.h @@ -0,0 +1,65 @@ +// NAVER Game SDK for iOS +// Copyright 2021-present NAVER Corp. +// +// Unauthorized use, modification and redistribution of this software are strongly prohibited. +// +// Created by Alan on 2021/05/14. + + +// Naver Game SDK Bridge Code for Unreal + + +#pragma once + +#import +#include "NaverGLink.h" + + +class FIOSNaverGLink : public INaverGLink +{ +public: + FIOSNaverGLink(); + + FString GetCountryCode() const; + + void Init(FString ClientId, FString ClientSecret, FString LoungeId) const; + void SetCanWriteFeedByScreenshot(bool Enabled) const; + void SetGameId(FString GameId) const; + + void StartHome() const; + void StartSorry() const; + + void StartBoard(int BoardId) const; + + void StartFeed(int FeedId, bool IsTempFeedId) const; + + void StartFeedWriting(int BoardId, FString Title, FString Text, FString ImageFilePath) const; + + void FinishSdk() const; + +}; + + +@interface NaverGLinkCallbackObject : NSObject + +@property (class, nonatomic, readonly) NaverGLinkCallbackObject *shared; + +@property (nonatomic, readonly) NSString *countryCode; + + +- (void)setClientId:(NSString *)clientId clientSecret:(NSString *)clientSecret loungeId:(NSString *)loungeId; +- (void)setCanWriteFeedByScreenshot:(BOOL)enabled; +- (void)setGameId:(NSString *)gameId; + +- (void)startHome; +- (void)startSorry; + +- (void)startBoardWithBoardId:(NSNumber *)boardId; + +- (void)startFeedWithFeedId:(NSNumber *)feedId tempFeedId:(BOOL)tempFeedId; + +- (void)startFeedWritingWithBoardId:(NSNumber *)boardId title:(NSString *)title text:(NSString *)text imageFilePath:(NSString *)imageFilePath; + +- (void)finishSdk; + +@end diff --git a/sample/unreal-sample-4.26.2/Plugins/NaverGameSdk/Source/NaverGameSdk/Private/NaverGLink.cpp b/sample/unreal-sample-4.26.2/Plugins/NaverGameSdk/Source/NaverGameSdk/Private/NaverGLink.cpp new file mode 100644 index 0000000..d0c4eb3 --- /dev/null +++ b/sample/unreal-sample-4.26.2/Plugins/NaverGameSdk/Source/NaverGameSdk/Private/NaverGLink.cpp @@ -0,0 +1,60 @@ +// Fill out your copyright notice in the Description page of Project Settings. +#include "NaverGLink.h" +#include "NaverGameSdkPrivatePCH.h" + +#if PLATFORM_ANDROID + +#include "Android/AndroidNaverGLink.h" + + FAndroidNaverGLink* GetSharedAndroidSdk() + { + static FAndroidNaverGLink* Glink = nullptr; + if (Glink == nullptr) + { + Glink = new FAndroidNaverGLink(); + } + return Glink; + } + + INaverGLink* GetSharedSdk() + { + return GetSharedAndroidSdk(); + } + + +#elif PLATFORM_IOS + + #include "IOS/IOSNaverGLink.h" + + FIOSNaverGLink* GetSharedIOSSdk() + { + static FIOSNaverGLink* GLink = nullptr; + if (GLink == nullptr) + { + GLink = new FIOSNaverGLink(); + } + return GLink; + } + INaverGLink* GetSharedSdk() + { + return GetSharedIOSSdk(); + } + + +#else + + #include "NaverGLink.h" + + INaverGLink* GetSharedSdk() + { + return nullptr; + } + + +#endif + +bool IsSdkAvailable() +{ + return GetSharedSdk() != nullptr; +} + diff --git a/sample/unreal-sample-4.26.2/Plugins/NaverGameSdk/Source/NaverGameSdk/Private/NaverGLink.h b/sample/unreal-sample-4.26.2/Plugins/NaverGameSdk/Source/NaverGameSdk/Private/NaverGLink.h new file mode 100644 index 0000000..d4aaacd --- /dev/null +++ b/sample/unreal-sample-4.26.2/Plugins/NaverGameSdk/Source/NaverGameSdk/Private/NaverGLink.h @@ -0,0 +1,29 @@ + +// Fill out your copyright notice in the Description page of Project Settings. + +#pragma once + +#include "CoreMinimal.h" + +/** + * + */ +class INaverGLink +{ +public: + + virtual void Init(FString ClientId, FString ClientSecret, FString LoungeId) const = 0; + virtual void StartHome() const = 0; + virtual void StartSorry() const = 0; + virtual void FinishSdk() const = 0; + virtual void StartBoard(int BoardId) const = 0; + virtual void StartFeed(int FeedId, bool IsTempFeedId) const = 0; + virtual FString GetCountryCode() const = 0; + virtual void SetCanWriteFeedByScreenshot(bool Enabled) const = 0; + virtual void SetGameId(FString GameId) const = 0; + virtual void StartFeedWriting(int BoardId, FString Title, FString Text, FString ImageFilePath) const = 0; + +}; + +INaverGLink* GetSharedSdk(); +bool IsNaverGameSdkAvailable(); diff --git a/sample/unreal-sample-4.26.2/Plugins/NaverGameSdk/Source/NaverGameSdk/Private/NaverGameSdk.cpp b/sample/unreal-sample-4.26.2/Plugins/NaverGameSdk/Source/NaverGameSdk/Private/NaverGameSdk.cpp new file mode 100644 index 0000000..7353c94 --- /dev/null +++ b/sample/unreal-sample-4.26.2/Plugins/NaverGameSdk/Source/NaverGameSdk/Private/NaverGameSdk.cpp @@ -0,0 +1,27 @@ +#include "NaverGameSdk.h" +#include "NaverGameSdkPrivatePCH.h" + +#define LOCTEXT_NAMESPACE "FNaverGameSdkModule" + +FNaverGameSdkModule::FOnSdkStarted FNaverGameSdkModule::OnSdkStarted; +FNaverGameSdkModule::FOnSdkStopped FNaverGameSdkModule::OnSdkStopped; +FNaverGameSdkModule::FOnReceiveInGameMenuCode FNaverGameSdkModule::OnReceiveInGameMenuCode; + +class NaverGameSdkModule : public FNaverGameSdkModule +{ + virtual void StartupModule() override; + virtual void ShutdownModule() override; +}; + +IMPLEMENT_MODULE(NaverGameSdkModule, NaverGameSdk) + +void NaverGameSdkModule::StartupModule() +{ + // This code will execute after your module is loaded into memory (but after global variables are initialized, of course.) +} + +void NaverGameSdkModule::ShutdownModule() +{ + // This function may be called during shutdown to clean up your module. For modules that support dynamic reloading, + // we call this function before unloading the module. +} diff --git a/sample/unreal-sample-4.26.2/Plugins/NaverGameSdk/Source/NaverGameSdk/Private/NaverGameSdkPrivatePCH.h b/sample/unreal-sample-4.26.2/Plugins/NaverGameSdk/Source/NaverGameSdk/Private/NaverGameSdkPrivatePCH.h new file mode 100644 index 0000000..c043f87 --- /dev/null +++ b/sample/unreal-sample-4.26.2/Plugins/NaverGameSdk/Source/NaverGameSdk/Private/NaverGameSdkPrivatePCH.h @@ -0,0 +1,6 @@ +// Copyright 2016 NAVER Corp. All rights reserved. + +#include "NaverGameSdk.h" + +// You should place include statements to your module's private header files here. You only need to +// add includes for headers that are used in most of your module's source files though. diff --git a/sample/unreal-sample-4.26.2/Plugins/NaverGameSdk/Source/NaverGameSdk/Public/GLink.h b/sample/unreal-sample-4.26.2/Plugins/NaverGameSdk/Source/NaverGameSdk/Public/GLink.h new file mode 100644 index 0000000..480ee78 --- /dev/null +++ b/sample/unreal-sample-4.26.2/Plugins/NaverGameSdk/Source/NaverGameSdk/Public/GLink.h @@ -0,0 +1,47 @@ +// Fill out your copyright notice in the Description page of Project Settings. + +#pragma once + +#include "CoreMinimal.h" +#include "Kismet/BlueprintFunctionLibrary.h" +#include "GLink.generated.h" + +/** + * + */ +UCLASS() +class NAVERGAMESDK_API UGLink : public UBlueprintFunctionLibrary +{ + GENERATED_UCLASS_BODY() + + UFUNCTION(BlueprintCallable, Category = "Naver GameSdk") + static void Init(FString ClientId, FString ClientSecret, FString LoungeId); + + UFUNCTION(BlueprintCallable, Category = "Naver GameSdk") + static void ExecuteHomeBanner(); + + UFUNCTION(BlueprintCallable, Category = "Naver GameSdk") + static void ExecuteSorryBanner(); + + UFUNCTION(BlueprintCallable, Category = "Naver GameSdk") + static void TerminateSdk(); + + UFUNCTION(BlueprintCallable, Category = "Naver GameSdk") + static void ExecuteBoard(int BoardId); + + UFUNCTION(BlueprintCallable, Category = "Naver GameSdk") + static void ExecuteFeed(int FeedId, bool IsTempFeedId); + + UFUNCTION(BlueprintCallable, Category = "Naver GameSdk") + static FString GetCountryCode(); + + UFUNCTION(BlueprintCallable, Category = "Naver GameSdk") + static void SetCanWriteFeedByScreenshot(bool Enabled); + + UFUNCTION(BlueprintCallable, Category = "Naver GameSdk") + static void SetGameId(FString GameId); + + UFUNCTION(BlueprintCallable, Category = "Naver GameSdk") + static void ExecuteFeedWriting(int BoardId, FString Title, FString Text, FString ImageFilePath); + +}; diff --git a/sample/unreal-sample-4.26.2/Plugins/NaverGameSdk/Source/NaverGameSdk/Public/NaverGameSdk.h b/sample/unreal-sample-4.26.2/Plugins/NaverGameSdk/Source/NaverGameSdk/Public/NaverGameSdk.h new file mode 100644 index 0000000..f4ac86b --- /dev/null +++ b/sample/unreal-sample-4.26.2/Plugins/NaverGameSdk/Source/NaverGameSdk/Public/NaverGameSdk.h @@ -0,0 +1,27 @@ +#pragma once + +#include "CoreMinimal.h" +#include "Modules/ModuleManager.h" + +class NAVERGAMESDK_API FNaverGameSdkModule : public IModuleInterface +{ +public: + + DECLARE_MULTICAST_DELEGATE(FOnSdkStarted); + DECLARE_MULTICAST_DELEGATE(FOnSdkStopped); + DECLARE_MULTICAST_DELEGATE_OneParam(FOnReceiveInGameMenuCode, const FString& /* In-Game Menu Code */); + + static inline FNaverGameSdkModule& Get() + { + return FModuleManager::LoadModuleChecked< FNaverGameSdkModule >( "NaverGameSdk" ); + } + + static inline bool IsAvailable() + { + return FModuleManager::Get().IsModuleLoaded( "NaverGameSdk" ); + } + + static FOnSdkStarted OnSdkStarted; + static FOnSdkStopped OnSdkStopped; + static FOnReceiveInGameMenuCode OnReceiveInGameMenuCode; +}; diff --git a/sample/unreal-sample-4.26.2/Plugins/NaverGameSdk/Source/NaverGameSdk/ThirdPartyFrameworks/Android/navergame-sdk-gradle-1.2.0.aar b/sample/unreal-sample-4.26.2/Plugins/NaverGameSdk/Source/NaverGameSdk/ThirdPartyFrameworks/Android/navergame-sdk-gradle-1.2.0.aar new file mode 100644 index 0000000..e2ed603 Binary files /dev/null and b/sample/unreal-sample-4.26.2/Plugins/NaverGameSdk/Source/NaverGameSdk/ThirdPartyFrameworks/Android/navergame-sdk-gradle-1.2.0.aar differ diff --git a/sample/unreal-sample-4.26.2/Plugins/NaverGameSdk/Source/NaverGameSdk/ThirdPartyFrameworks/iOS/NNGSDK.embeddedframework.zip b/sample/unreal-sample-4.26.2/Plugins/NaverGameSdk/Source/NaverGameSdk/ThirdPartyFrameworks/iOS/NNGSDK.embeddedframework.zip new file mode 100644 index 0000000..34c832c Binary files /dev/null and b/sample/unreal-sample-4.26.2/Plugins/NaverGameSdk/Source/NaverGameSdk/ThirdPartyFrameworks/iOS/NNGSDK.embeddedframework.zip differ diff --git a/sample/unreal-sample-4.26.2/Plugins/NaverGameSdk/Source/NaverGameSdk/ThirdPartyFrameworks/iOS/NaverLogin.embeddedframework.zip b/sample/unreal-sample-4.26.2/Plugins/NaverGameSdk/Source/NaverGameSdk/ThirdPartyFrameworks/iOS/NaverLogin.embeddedframework.zip new file mode 100644 index 0000000..8f9bce1 Binary files /dev/null and b/sample/unreal-sample-4.26.2/Plugins/NaverGameSdk/Source/NaverGameSdk/ThirdPartyFrameworks/iOS/NaverLogin.embeddedframework.zip differ diff --git a/sample/unreal-sample-4.26.2/Source/UE_4_26_2.Target.cs b/sample/unreal-sample-4.26.2/Source/UE_4_26_2.Target.cs new file mode 100644 index 0000000..23e979f --- /dev/null +++ b/sample/unreal-sample-4.26.2/Source/UE_4_26_2.Target.cs @@ -0,0 +1,15 @@ +// Fill out your copyright notice in the Description page of Project Settings. + +using UnrealBuildTool; +using System.Collections.Generic; + +public class UE_4_26_2Target : TargetRules +{ + public UE_4_26_2Target(TargetInfo Target) : base(Target) + { + Type = TargetType.Game; + DefaultBuildSettings = BuildSettingsVersion.V2; + + ExtraModuleNames.AddRange( new string[] { "UE_4_26_2" } ); + } +} diff --git a/sample/unreal-sample-4.26.2/Source/UE_4_26_2/DummyClass.cpp b/sample/unreal-sample-4.26.2/Source/UE_4_26_2/DummyClass.cpp new file mode 100644 index 0000000..2df5ddd --- /dev/null +++ b/sample/unreal-sample-4.26.2/Source/UE_4_26_2/DummyClass.cpp @@ -0,0 +1,27 @@ +// Fill out your copyright notice in the Description page of Project Settings. + + +#include "DummyClass.h" + +// Sets default values +ADummyClass::ADummyClass() +{ + // Set this actor to call Tick() every frame. You can turn this off to improve performance if you don't need it. + PrimaryActorTick.bCanEverTick = true; + +} + +// Called when the game starts or when spawned +void ADummyClass::BeginPlay() +{ + Super::BeginPlay(); + +} + +// Called every frame +void ADummyClass::Tick(float DeltaTime) +{ + Super::Tick(DeltaTime); + +} + diff --git a/sample/unreal-sample-4.26.2/Source/UE_4_26_2/DummyClass.h b/sample/unreal-sample-4.26.2/Source/UE_4_26_2/DummyClass.h new file mode 100644 index 0000000..e8a073c --- /dev/null +++ b/sample/unreal-sample-4.26.2/Source/UE_4_26_2/DummyClass.h @@ -0,0 +1,26 @@ +// Fill out your copyright notice in the Description page of Project Settings. + +#pragma once + +#include "CoreMinimal.h" +#include "GameFramework/Actor.h" +#include "DummyClass.generated.h" + +UCLASS() +class UE_4_26_2_API ADummyClass : public AActor +{ + GENERATED_BODY() + +public: + // Sets default values for this actor's properties + ADummyClass(); + +protected: + // Called when the game starts or when spawned + virtual void BeginPlay() override; + +public: + // Called every frame + virtual void Tick(float DeltaTime) override; + +}; diff --git a/sample/unreal-sample-4.26.2/Source/UE_4_26_2/MyClass.cpp b/sample/unreal-sample-4.26.2/Source/UE_4_26_2/MyClass.cpp new file mode 100644 index 0000000..40012b2 --- /dev/null +++ b/sample/unreal-sample-4.26.2/Source/UE_4_26_2/MyClass.cpp @@ -0,0 +1,12 @@ +// Fill out your copyright notice in the Description page of Project Settings. + + +#include "MyClass.h" + +MyClass::MyClass() +{ +} + +MyClass::~MyClass() +{ +} diff --git a/sample/unreal-sample-4.26.2/Source/UE_4_26_2/MyClass.h b/sample/unreal-sample-4.26.2/Source/UE_4_26_2/MyClass.h new file mode 100644 index 0000000..4d64b56 --- /dev/null +++ b/sample/unreal-sample-4.26.2/Source/UE_4_26_2/MyClass.h @@ -0,0 +1,15 @@ +// Fill out your copyright notice in the Description page of Project Settings. + +#pragma once + +#include "CoreMinimal.h" + +/** + * + */ +class UE_4_26_2_API MyClass +{ +public: + MyClass(); + ~MyClass(); +}; diff --git a/sample/unreal-sample-4.26.2/Source/UE_4_26_2/UE_4_26_2.Build.cs b/sample/unreal-sample-4.26.2/Source/UE_4_26_2/UE_4_26_2.Build.cs new file mode 100644 index 0000000..0c1d587 --- /dev/null +++ b/sample/unreal-sample-4.26.2/Source/UE_4_26_2/UE_4_26_2.Build.cs @@ -0,0 +1,23 @@ +// Fill out your copyright notice in the Description page of Project Settings. + +using UnrealBuildTool; + +public class UE_4_26_2 : ModuleRules +{ + public UE_4_26_2(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 + } +} diff --git a/sample/unreal-sample-4.26.2/Source/UE_4_26_2/UE_4_26_2.cpp b/sample/unreal-sample-4.26.2/Source/UE_4_26_2/UE_4_26_2.cpp new file mode 100644 index 0000000..6398a40 --- /dev/null +++ b/sample/unreal-sample-4.26.2/Source/UE_4_26_2/UE_4_26_2.cpp @@ -0,0 +1,6 @@ +// Fill out your copyright notice in the Description page of Project Settings. + +#include "UE_4_26_2.h" +#include "Modules/ModuleManager.h" + +IMPLEMENT_PRIMARY_GAME_MODULE( FDefaultGameModuleImpl, UE_4_26_2, "UE_4_26_2" ); diff --git a/sample/unreal-sample-4.26.2/Source/UE_4_26_2/UE_4_26_2.h b/sample/unreal-sample-4.26.2/Source/UE_4_26_2/UE_4_26_2.h new file mode 100644 index 0000000..90aad9e --- /dev/null +++ b/sample/unreal-sample-4.26.2/Source/UE_4_26_2/UE_4_26_2.h @@ -0,0 +1,6 @@ +// Fill out your copyright notice in the Description page of Project Settings. + +#pragma once + +#include "CoreMinimal.h" + diff --git a/sample/unreal-sample-4.26.2/Source/UE_4_26_2Editor.Target.cs b/sample/unreal-sample-4.26.2/Source/UE_4_26_2Editor.Target.cs new file mode 100644 index 0000000..682d94b --- /dev/null +++ b/sample/unreal-sample-4.26.2/Source/UE_4_26_2Editor.Target.cs @@ -0,0 +1,15 @@ +// Fill out your copyright notice in the Description page of Project Settings. + +using UnrealBuildTool; +using System.Collections.Generic; + +public class UE_4_26_2EditorTarget : TargetRules +{ + public UE_4_26_2EditorTarget(TargetInfo Target) : base(Target) + { + Type = TargetType.Editor; + DefaultBuildSettings = BuildSettingsVersion.V2; + + ExtraModuleNames.AddRange( new string[] { "UE_4_26_2" } ); + } +} diff --git a/sample/unreal-sample-4.26.2/UE_4_26_2.uproject b/sample/unreal-sample-4.26.2/UE_4_26_2.uproject new file mode 100644 index 0000000..f2073e4 --- /dev/null +++ b/sample/unreal-sample-4.26.2/UE_4_26_2.uproject @@ -0,0 +1,22 @@ +{ + "FileVersion": 3, + "EngineAssociation": "4.26", + "Category": "", + "Description": "", + "Modules": [ + { + "Name": "UE_4_26_2", + "Type": "Runtime", + "LoadingPhase": "Default", + "AdditionalDependencies": [ + "Engine" + ] + } + ], + "Plugins": [ + { + "Name": "NaverGameSdk", + "Enabled": true + } + ] +} \ No newline at end of file