123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122 |
- 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);
- }
- /// <summary>
- /// 储存String
- /// </summary>
- /// <param name="key">键</param>
- /// <param name="value">值</param>
- public static void SetString(string key, string value)
- {
- PlayerPrefs.SetString(key, value);
- PlayerPrefs.Save();
- }
-
- /// <summary>
- /// 取String
- /// </summary>
- /// <param name="key">键</param>
- /// <returns></returns>
- 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<AndroidJavaObject>("currentActivity");
- AndroidJavaObject curApplication = currentActivity.Call<AndroidJavaObject>("getApplication");
- AndroidJavaObject curSystemService = curApplication.Call<AndroidJavaObject>("getSystemService", "activity");
- AndroidJavaObject curConfigurationInfo = curSystemService.Call<AndroidJavaObject>("getDeviceConfigurationInfo");
- int reqGlEsVersion = curConfigurationInfo.Get<int>("reqGlEsVersion");
- AndroidJavaClass curInteger = AndroidJavaClass("java.lang.Integer");
- version = curInteger.CallStatic<string>("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;
- }
- }
|