using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; using SC; public class CloudManagerButton : MonoBehaviour { // public LoadPointVyncL_Eye _v_L; //public LoadPointVyncR_Eye _v_R; //public LoadPointVync _v; public CloudPoint _PointCloud; public static string ip; public GameObject keybood; public SCInputField text; // Start is called before the first frame update // public WebRtcManager _WebRtcManager; void Start() { ip = GetString("ip"); text.text = ip; } public void setIP() { SetString("ip", text.text); Debug.Log(ip+" ipip"); _PointCloud.ip = text.text; _PointCloud.enabled = true; keybood.SetActive(false); } /// /// 储存String /// /// 键 /// 值 public static void SetString(string key, string value) { PlayerPrefs.SetString(key, value); PlayerPrefs.Save(); } /// /// 取String /// /// 键 /// public static string GetString(string key) { return PlayerPrefs.GetString(key); } /*public static string GetOpenGL() { string version = "0"; #if (UNITY_ANDROID && !UNITY_EDITOR) || ANDROID_CODE_VIEW try { AndroidJavaClass unityPlayer = AndroidJavaClass("com.unity3d.player.UnityPlayer"); AndroidJavaObject currentActivity = unityPlayer.GetStatic("currentActivity"); AndroidJavaObject curApplication = currentActivity.Call("getApplication"); AndroidJavaObject curSystemService = curApplication.Call("getSystemService", "activity"); AndroidJavaObject curConfigurationInfo = curSystemService.Call("getDeviceConfigurationInfo"); int reqGlEsVersion = curConfigurationInfo.Get("reqGlEsVersion"); AndroidJavaClass curInteger = AndroidJavaClass("java.lang.Integer"); version = curInteger.CallStatic("toString",reqGlEsVersion,16); } catch (Exception e) { ILog.Warn(TAG + ", GetOpenGL, Exception: " + e.ToString()); } #elif (UNITY_IOS && !UNITY_EDITOR) || IOS_CODE_VIEW version = "-1"; #endif return version; }*/ // Update is called once per frame void Update() { if (Input.GetKeyDown(KeyCode.Escape)) { Application.Quit(); } } public void addhead() { // _PointCloud.offsetZ += 1; _PointCloud.headPointSize += 0.001f; } public void redhead() { // _PointCloud.offsetZ -= 1; _PointCloud.headPointSize -= 0.001f; } public void addbody() { // _PointCloud.offsetZ += 1; _PointCloud.bodyPointSize += 0.001f; } public void redbody() { // _PointCloud.offsetZ -= 1; _PointCloud.bodyPointSize -= 0.001f; } }