CloseAutoImmersal.cs 546 B

12345678910111213141516171819
  1. using Newtonsoft.Json;
  2. using UnityEngine;
  3. /// <summary>
  4. /// 指定用户关闭Immersal自动定位
  5. /// 洋浦党建
  6. /// </summary>
  7. public class CloseAutoImmersal : MonoBehaviour
  8. {
  9. void Start()
  10. {
  11. TextAsset jsonTextAsset = Resources.Load("BlueUserConfig") as TextAsset;
  12. BlueUserConfig BlueUserConfig = JsonConvert.DeserializeObject<BlueUserConfig>(jsonTextAsset.text);
  13. if (BlueUserConfig.Auto)
  14. {
  15. GameObject.Find("SetBtn/Canvas/Parent/LocalizeBtn").gameObject.SetActive(false);
  16. }
  17. }
  18. }