using UnityEngine; using System.Collections; using System.Runtime.InteropServices; public class PlatformIOS : MonoBehaviour { public static PlatformIOS Instance; void Awake() { Instance = this; } #if UNITY_IPHONE [DllImport("__Internal")] public static extern void ShareLink(int id, string json_data); [DllImport("__Internal")] public static extern void WXLogin(); [DllImport("__Internal")] public static extern float GetBatteryLevel(); [DllImport("__Internal")] public static extern int GetWIFISignalStrength(); [DllImport("__Internal")] public static extern int GetTeleSignalStrength(); [DllImport("__Internal")] public static extern void CopyToClipboard(string input); #endif static string _roomid = string.Empty; public void InsertRoom(string roomid) { _roomid = roomid; } public static string GetRoomID() { var tem = _roomid; _roomid = string.Empty; return tem; } }