Configure for Android

To use the advanced features of Hercules, the prefab feature should be enabled in the Android Gradle module.

Setting up your Android Studio project

  • For Android Gradle Plugin < 4.1
    • Add the following to your gradle.properties file.
  • For Android Gradle Plugin ≥ 4.1
    • Add the following to the android block in the build.gradle file.
  • Setting up CMake / ndk-build (when using C/C++)

  • For NDK ≥ r21
  •  

  • NDK < r21
    • Add the Hercules.h file to your project and use the direct link to the .so file path.

  • Configure for iOS

    How to Configure

  • Find .h under the path of the Hercules framework installed in the project through CocoaPods, and import it into the project. You can select and use any of the headers included in the simulator or device target path. The path is:
    • “${PROJECT_ROOT_DIR}/Pods/Hercules/Hive_SDK_iOS_External_${HIVE_SDK_VERSION}/Hercules.xcframework/${SIMULATOR_OR_PHONEOS}/Hercules.framework/Headers/Hercules.h”

  • Configure for Unity

    Mobile

  • Add USE_HERCULES to the Unity preprocessor flag.
    • Player Settings -> Other Settings -> Script Compilation -> Scripting Define Symbols
  • Enable Allow ‘unsafe’ Code.
    • Player Settings -> Other Settings -> Script Compilation -> Allow ‘unsafe’ Code
  • Windows

    • Enter USE_HERCULES in Scripting Define Symbols
    • Check Allow ‘unsafe’ Code.
    • Use Hercules additional APIs via HerculesPlugin.

    Configure for Unreal

    Mobile

    The Hercules module included in the Hive SDK Unreal Plugin does not support Hercules advanced features. To use the Hercules advanced features in the Unreal environment, see below.

    1. Remove the Hercules module included in Hive SDK Unreal Plugin

    2. Disable the removed Hercules module

    3. Find the header and libraries in the Hercules folder located at the top of the plugin directory, and add them to your game project

    Windows

    If Target.Platform == UnrealTargetPlatform.Win64 is set in HIVESDK.Build.cs, .lib settings are required as shown below.

    After completing the setting, use the advanced features as shown in the example below.