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++17: static int schemaHash()¶
- Traditional 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++17: static void onPause()¶
- Traditional 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++17: static void onResume()¶
- Traditional 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++17: static std::string errorMessage()¶
- Traditional C++: static void errorMessage(String * * Return)¶
- 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++17: static std::string versionString()¶
- Traditional C++: static void versionString(String * * Return)¶
- 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++17: static std::string name()¶
- Traditional C++: static void name(String * * Return)¶
- 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()¶
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. This method will automatically load EasyAR native libraries. If you need more flexible control of native library loading, use initializeWithoutSoLibraryLoad instead. Notice: When running Unity on Android, you need to call the initialize method from Java, not directly call the one from C#.
- C: bool easyar_Engine_initialize(easyar_String * key)¶
- C++17: static bool initialize(std::string key)¶
- Traditional C++: static bool initialize(String * key)¶
- Java: public static boolean initialize(android.app.@Nonnull Activity activity, java.lang.@Nonnull String key)¶
- Java: public static boolean initialize(android.app.@Nonnull Activity activity, java.lang.@Nonnull String key, java.lang.@Nonnull String soLibraryDir)¶
- Kotlin: companion object fun initialize(activity: android.app.Activity, key: String): Boolean¶
- Kotlin: companion object fun initialize(activity: android.app.Activity, key: String, soLibraryDir: String): Boolean¶
- Objective-C: + (bool)initialize:(NSString *)key¶
- Swift: public static func initialize(_ key: String) -> Bool¶
- C#: public static bool initialize(string key)¶
initializeWithoutSoLibraryLoad¶
Initializes EasyAR. Only after initialize is called, can other functions be called.
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 key)¶
- Kotlin: companion object fun initializeWithoutSoLibraryLoad(activity: android.app.Activity, key: String): Boolean¶
loadLibraries¶
Load native libraries, use only if you are using Engine.initializeWithoutSoLibraryLoad to initialize EasyAR.
- Java: public static void loadLibraries()¶
- Java: public static void loadLibraries(java.lang.@Nonnull String soLibraryDir)¶
- Kotlin: companion object fun loadLibraries(): Unit¶
- Kotlin: companion object fun loadLibraries(soLibraryDir: String): Unit¶