Skip to content

pokeum/unity-mobile-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Unity Mobile SDK

Generic badge

Android Environment

Callback Function

Unity

  • C#
    Plugin.CallTestFunc(
      delayMillis: 5000,
      onSuccess: () => {
        Debug.Log("[Plugin] CallTestFunc OnSuccess Called!"); 
      }, 
      onFailure: (exception) => {
        Debug.Log($"[Plugin] CallTestFunc OnFailure Called! : {exception.Message}");
      }
    );

Android

  • Kotlin
    Plugin.TestFunc(
      /* delayMillis  : */ 5000,
      /* onSuccess    : */ { Log.d(TAG, "TestFunc OnSuccess Called!") },
      /* onFailure    : */ { Log.d(TAG, "TestFunc OnFailure Called! : ${it.message}") }
    )
  • Java
    Plugin.TestFunc(
      /* delayMillis  : */ 5000,
      /* onSuccess    : */ () -> Log.d(TAG, "TestFunc OnSuccess Called!"),
      /* onFailure    : */ result -> Log.d(TAG, "TestFunc OnFailure Called! : " + result.getMessage())
    );

iOS

Reference