Engine Class¶
schemaHash¶
Gets the version schema hash, which can be used to ensure type declarations consistent with runtime library.
- C
int easyar_Engine_schemaHash(void)
- C++
static int schemaHash()
- Java
public static int schemaHash()
- Kotlin
companion object fun schemaHash(): Int
- Objective-C
+ (int)schemaHash
- Swift
public static func schemaHash() -> Int32
- C#
public static int schemaHash()
onPause¶
Handles the app onPause, pauses internal tasks.
- C
void easyar_Engine_onPause(void)
- C++
static void onPause()
- Java
public static void onPause()
- Kotlin
companion object fun onPause(): Unit
- Objective-C
+ (void)onPause
- Swift
public static func onPause() -> Void
- C#
public static void onPause()
onResume¶
Handles the app onResume, resumes internal tasks.
- C
void easyar_Engine_onResume(void)
- C++
static void onResume()
- Java
public static void onResume()
- Kotlin
companion object fun onResume(): Unit
- Objective-C
+ (void)onResume
- Swift
public static func onResume() -> Void
- C#
public static void onResume()
errorMessage¶
Gets error message on initialization failure.
- C
void easyar_Engine_errorMessage(easyar_String * * Return)
- C++
static std::string errorMessage()
- Java
public static java.lang.@Nonnull String errorMessage()
- Kotlin
companion object fun errorMessage(): String
- Objective-C
+ (NSString *)errorMessage
- Swift
public static func errorMessage() -> String
- C#
public static string errorMessage()
versionString¶
Gets the version number of EasyARSense.
- C
void easyar_Engine_versionString(easyar_String * * Return)
- C++
static std::string versionString()
- Java
public static java.lang.@Nonnull String versionString()
- Kotlin
companion object fun versionString(): String
- Objective-C
+ (NSString *)versionString
- Swift
public static func versionString() -> String
- C#
public static string versionString()
name¶
Gets the product name of EasyARSense. (Including variant, operating system and CPU architecture.)
- C
void easyar_Engine_name(easyar_String * * Return)
- C++
static std::string name()
- Java
public static java.lang.@Nonnull String name()
- Kotlin
companion object fun name(): String
- Objective-C
+ (NSString *)name
- Swift
public static func name() -> String
- C#
public static string name()
variant¶
Gets the release variant of EasyARSense.
- C
void easyar_Engine_variant(easyar_String * * Return)
- C++
static std::string variant()
- Java
public static java.lang.@Nonnull String variant()
- Kotlin
companion object fun variant(): String
- Objective-C
+ (NSString *)variant
- Swift
public static func variant() -> String
- C#
public static string variant()
isLicenseKeyMatched¶
Checks whether the license key matches the provided release variant, package name(or bundle id) and operating system.
- C
bool easyar_Engine_isLicenseKeyMatched(easyar_String * licenseKey, easyar_String * packageName, easyar_String * variant, easyar_EngineOperatingSystem operatingSystem)
- C++
static bool isLicenseKeyMatched(std::string licenseKey, std::string packageName, std::string variant, EngineOperatingSystem operatingSystem)
- Java
public static boolean isLicenseKeyMatched(java.lang.@Nonnull String licenseKey, java.lang.@Nonnull String packageName, java.lang.@Nonnull String variant, int operatingSystem)
- Kotlin
companion object fun isLicenseKeyMatched(licenseKey: String, packageName: String, variant: String, operatingSystem: Int): Boolean
- Objective-C
+ (bool)isLicenseKeyMatched:(NSString *)licenseKey packageName:(NSString *)packageName variant:(NSString *)variant operatingSystem:(easyar_EngineOperatingSystem)operatingSystem
- Swift
public static func isLicenseKeyMatched(_ licenseKey: String, _ packageName: String, _ variant: String, _ operatingSystem: EngineOperatingSystem) -> Bool
- C#
public static bool isLicenseKeyMatched(string licenseKey, string packageName, string variant, EngineOperatingSystem operatingSystem)
initialize¶
Initializes EasyAR. Only after initialize is called, can other functions be called.
Android Only An Activity for content hosting need to be passed in for permission requests, recording, etc. It is equivalent to call loadLibraries, setupActivity and initializeKey.
- C
bool easyar_Engine_initialize(easyar_String * licenseKey)
- C++
static bool initialize(std::string licenseKey)
- Java
public static boolean initialize(android.app.@Nonnull Activity activity, java.lang.@Nonnull String licenseKey)
public static boolean initialize(android.app.@Nonnull Activity activity, java.lang.@Nonnull String licenseKey, java.lang.@Nonnull String soLibraryDir)
- Kotlin
companion object fun initialize(activity: android.app.Activity, licenseKey: String): Boolean
companion object fun initialize(activity: android.app.Activity, licenseKey: String, soLibraryDir: String): Boolean
- Objective-C
+ (bool)initialize:(NSString *)licenseKey
- Swift
public static func initialize(_ licenseKey: String) -> Bool
- C#
public static bool initialize(string licenseKey)
initializeWithoutSoLibraryLoad¶
Android Only
Initializes EasyAR. Only after initialize is called, can other functions be called. It is equivalent to call setupActivity and initializeKey..
This method will not load EasyAR native libraries, make sure to load libraries by your own or using Engine.loadLibraries .
- Java
public static boolean initializeWithoutSoLibraryLoad(android.app.@Nonnull Activity activity, java.lang.@Nonnull String licenseKey)
- Kotlin
companion object fun initializeWithoutSoLibraryLoad(activity: android.app.Activity, licenseKey: String): Boolean
loadLibraries¶
Android Only
Loads EasyAR Sense native libraries.
- Java
public static void loadLibraries()
public static void loadLibraries(java.lang.@Nonnull String soLibraryDir)
- Kotlin
companion object fun loadLibraries(): Unit
companion object fun loadLibraries(soLibraryDir: String): Unit
setupActivity¶
Android Only
Passes in an Activity for content hosting for permission requests, recording, etc.
Notice: When running Unity, you need to call setupActivity before calling the C# initialize method.
- Java
public static boolean setupActivity(android.app.@Nonnull Activity activity)
- Kotlin
companion object fun setupActivity(activity: android.app.Activity): Boolean
initializeKey¶
Android Only
Initializes the license key.
- Java
public static boolean initializeKey(java.lang.@Nonnull String licenseKey)
- Kotlin
companion object fun initializeKey(licenseKey: String): Boolean