This guide describes the environments and initial setting of Gamebase Unity SDK.
[Note]
Supported Unity versions
- 2020.3.16f1 ~ 6000.2.0a6
Can easily install the Gamebase SDK using the SettingTool.
Can use the SettingTool features by selecting Tools > Gamebase from the top menu bar in the Unity Editor.
Select Tools > Gamebase > Setup Wizard menu.
[Note]
- can check the required settings through Required Settings.
Select Tools > Gamebase > Update Latest Version menu.
Select Tools > Gamebase > Customize... menu.
[Note]
- can check the required settings through Required Settings.
The SettingTool provides a UI where Can view and modify required settings. Can find them in both the Setup Wizard and Customize menus. Once all required settings are completed, the corresponding item will disappear.
[Caution]
If the Required Settings are not resolved, errors may occur when running or building the project.
If you're using Android or iOS platforms, EDM4U(External Dependency Manager) is required.
[Note]
- If EDM4U is not installed in the project, first download the UnityPackage file and import it to install.
To configure the Gamebase Android SDK, essential files need to be generated.
To manage the Android Lifecycle, you need to set the Activity provided by Gamebase as the MainActivity.
The MainActivity setting depends on the Application Entry Point.
[Caution]
- The MainActivity must be the one provided by Gamebase or inherit from it.
<manifest>
...
<application>
...
<!-- For versions below 2022 or if it is an Activity -->
<!-- If android:exported is missing, it needs to be added -->
<activity android:name="com.toast.android.gamebase.activity.GamebaseMainActivity"
android:exported="true"
...>
...
</activity>
...
<!-- For versions 2023 and above, if it's GameActivity -->
<!-- If android:exported is missing, it needs to be added -->
<activity android:name="com.toast.android.gamebase.activity.GamebaseMainGameActivity"
android:exported="true"
...>
...
</activity>
...
</application>
...
</manifest>
Assets > External Dependency Manager > Android Resolver > Settings > Android Resolver Settings
When installing the Gamebase SDK using the Setting Tool, if EDM4U is installed, the resolve process will run automatically to configure the settings.
If EDM4U is not installed or if changes are needed, manual resolution can be performed.
Assets > External Dependency Manager > Android Resolver > Force Resolve
If you're servicing the iOS platform, CocoaPods must be installed. For installation and detailed instructions, refer to the CocoaPods official site.
CocoaPods can also be installed through EDM4U.
Assets > External Dependency Manager > iOS Resolver > install Cocoapods
Assets > External Dependency Manager > iOS Resolver > Settings > iOS Resolver Settings
Depending on the selected module, May need to configure settings directly through Xcode.
Build the iOS project in Unity.
API Reference is included in GamebaseUnitySDK.
API
Platforms supporting each API are classified by the icons as below.
Supported Platforms ■ UNITY_IOS ■ UNITY_ANDROID ■ UNITY_STANDALONE ■ UNITY_WEBGL ■ UNITY_EDITOR
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.
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