コード例 #1
0
            public void OnResult(string json)
            {
                AndroidLogger.LogJavaCallbackAsync(json);
                var result = JsonUtility.FromJson <T>(json);

                MainThreadDispatcher.Enqueue(() =>
                {
                    m_ResultHandler.Invoke(result);
                });
            }
コード例 #2
0
        /// <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());
        }
コード例 #3
0
 /// <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);