public void OnResult(string json) { AndroidLogger.LogJavaCallbackAsync(json); var result = JsonUtility.FromJson <T>(json); MainThreadDispatcher.Enqueue(() => { m_ResultHandler.Invoke(result); }); }
/// <summary> /// Combine all of the options that have been set and invoke native method. /// </summary> public void Invoke() { AndroidLogger.LogJavaMethodCall(m_ClassName, m_MethodName, m_Arguments); if (Application.isEditor) { return; } var javaClass = Java.GetJavaClass(m_ClassName); javaClass.CallStatic(m_MethodName, m_Arguments.ToArray()); }
/// <summary> /// Combine all of the options that have been set and invoke native method. /// </summary> /// <typeparam name="TR">Method return type.</typeparam> /// <returns>Native method result.</returns> public TR Invoke <TR>() { AndroidLogger.LogJavaMethodCall(m_ClassName, m_MethodName, m_Arguments); if (Application.isEditor) { return(default);