This guide describes the environments and initial setting of Gamebase Unity SDK.
Supported Unity versions
- To support a lower version of Unity, contact Customer Center.
Since August 1 of 2019, new apps on Google Play must support 64-bit architecture. See Google Play policy and Unity versions supporting 64 bits
|Gamebase SDK||External SDK|
|Gamebase||NHN Cloud Unity SDK 0.26.2|
To call a Gamebase API which is not supported by a selected platform, following errors are returned as callback. If there is no callback, the output will come with a warning log.
Platforms supporting each API are classified by the icons as below.
Supported Platforms ■ UNITY_IOS ■ UNITY_ANDROID ■ UNITY_STANDALONE ■ UNITY_WEBGL ■ UNITY_EDITOR
Setting Tool is provided to install Gamebase SDK easily.
If you provide a service for the iOS platform, CocoaPods must be installed. For CocoaPods installation and detailed instructions, refer to cocoapods.org.
If there is no EDM4U, Gamebase SDK for Android and iOS settings are not available.
Before executing EDM4U resolve, click the Switch Platform button in the Build Settings window to switch to the platform you want to build for. If the Android platform is selected, you need to enable Custom Gradle Template in Player Settings > Publishing Settings to create the mainTemplate.gradle file.
Unity 2019.3 or later, you need to enable Custom Gradle Properties Template in Player Settings > Publishing Settings to create a gradleTemplate.properties file.
If an unexpected error occurs at Setting Tool, close the window and try again.
If the error is not resolved by re-running, open the SettingToolWindow.cs file in Assets/NhnCloud/GamebaseTools/SettingTool/Editor/Scripts, uncomment SettingTool.SetDebugMode(true); code in the ShowWindow method, and send the log.
If the Setting Tool needs to be updated, the Setting Tool informs whether update is available or not. Depending on the update type, some functions provided by Setting Tool may be limited.
Facebook SDK for iOS and Android are included in Facebook SDK.
When you enable Facebook authentication in Unity settings
and also enable Facebook authentication in Android and iOS settings,
Facebook SDKs are included as duplicate in the project, resulting in errors such as authentication failure or build failure. To prevent such errors, SettingTool is configured to prevent the user from enabling Facebook authentication both in Unity settings and Android & iOS settings.
[Caution]You cannot enable Facebook authentication both in Unity settings and Android & iOS settings. When you enable Facebook authentication in Unity settings, you need to Download Facebook SDK for Unity.
Refer to the table below for SettingTool settings for each game company.
|SettingTool > Unity settings > Enable Facebook authentication||SettingTool > Android, iOS settings > Enable Facebook authentication|
|Features required for games||Gamebase Facebook Login (Android, iOS)
Use features such as ShareLink or FeedShare
|Gamebase Facebook Login (Android, iOS)|
|Android, iOS Login API||Gamebase Login with Credential||Gamebase Login with ID Provider|
|Download Facebook SDK for Unity||O||X|
To manage lifecycle, set "com.toast.gamebase.activity.GamebaseMainActivity" as the MainActivity. "com.toast.gamebase.activity.GamebaseMainActivity" has been inherited from "com.unity3d.player.UnityPlayerNativeActivity".
AndroidPlugin should be developed in inheritance of GamebaseMainActivity. GamebaseMainActivity is included to GamebasePlugin.jar. The launchMode should be a singleTask (Unity&'s default activity will also be fixed as singleTask). Otherwise, crash may occur when an app starts.
To change the Lifecycle, you need to activate Project Settings > Settings for Android > Publish Settings > Build > Custom Main Manifest and edit the AndroidManifest.xml.
When setting Android's targetSdkVersion to 31 or higher, you must declare the android:exported attribute in the tag where the intent-filter exists. Even when setting GamebaseMainActivity, which is provided by Gamebase to manage lifecycle, as MainActivity, android:exported="true" must be added to the attribute.
<manifest> ... <application> ... <activity android:name="com.toast.android.gamebase.activity.GamebaseMainActivity" android:launchMode="singleTask" android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation" android:label="@string/app_name" android:exported="true"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> ... </application> ... </manifest>
- Caution for Unity 2019.3 or later
- Go to TARGETS > UnityFramework and add iOS SDK setting.
API Reference is included in GamebaseUnitySDK.
The API which is not supported by Gamebase anymore is processed as deprecated (deprecate). A deprecated API can be deleted without any prior notice when the following conditions are met:
Gamebase version format - XX.YY.ZZ
Time elapse of at least five months