55 lines
		
	
	
		
			784 B
		
	
	
	
		
			C#
		
	
	
	
			
		
		
	
	
			55 lines
		
	
	
		
			784 B
		
	
	
	
		
			C#
		
	
	
	
| using UnityEngine;
 | |
| using System.Collections;
 | |
| 
 | |
| 
 | |
| #if UNITY_ANDROID
 | |
| 
 | |
| public class ATMsgTools
 | |
| {
 | |
| 	private  AndroidJavaObject _Plugin;
 | |
| 
 | |
| 	public ATMsgTools ()
 | |
| 	{
 | |
| 		try{
 | |
| 			if (Application.platform != RuntimePlatform.Android)
 | |
| 				return;
 | |
| 
 | |
| 			_Plugin = new AndroidJavaObject ("com.thinkup.unitybridge.MsgTools");
 | |
| 
 | |
| 		}catch(System.Exception e)
 | |
| 		{
 | |
| 			System.Console.WriteLine("Exception caught: {0}", e);
 | |
| 		}
 | |
| 	}
 | |
| 
 | |
| 
 | |
| 	public  void printLogI (string msg)
 | |
| 	{
 | |
| 		try{
 | |
| 			
 | |
| 			_Plugin.Call ("printLogI",msg);
 | |
| 		}catch(System.Exception e)
 | |
| 		{
 | |
| 			System.Console.WriteLine("Exception caught: {0}", e);
 | |
| 		}
 | |
| 	}
 | |
| 
 | |
| 
 | |
| 	public  void printMsg (string msg)
 | |
| 	{
 | |
| 		try{
 | |
| 			_Plugin.Call ("pirntMsg",msg);
 | |
| 		}catch(System.Exception e)
 | |
| 		{
 | |
| 			System.Console.WriteLine("Exception caught: {0}", e);
 | |
| 		}
 | |
| 	}
 | |
| 
 | |
| 
 | |
| }
 | |
| 
 | |
| #endif
 | |
| 
 | |
| 
 | |
| 
 |