using Newtonsoft.Json; using ShadowStudio.Mgr; using Studio.Scripts; using Studio.Scripts.HttpMessage; using System; using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; using XRTool.Util; using XRTool.WorldUI; namespace ShadowStudio.UI { [RequireComponent(typeof(WorldDlg))] public class AboutMeDlg : UnitySingleton { WorldDlg dlg; private XRIcon avatar; private TextMesh userNameText; private Toggle cameraToggle_Switch; private Toggle micToggle_Switch; private Transform toggleGroupTran; private Transform framerateToggleGroup; private Button loginoutBtn; private Button closeBtn; void Start() { dlg = GetComponent(); avatar = dlg.GetBreadthChild("Avatar"); for (int i = 0; i < CommonMethod.UserAvatarsList.Count; i++) { if (UserInfoMgr.Instance.userConfig.Avatar == CommonMethod.UserAvatarsList[i].Url) { string path = "Avatar/" + CommonMethod.UserAvatarsList[i].Id + "Avatar"; avatar.icon = Resources.Load(path) as Texture2D; avatar.AutoSetSprite(); } } userNameText = dlg.GetBreadthChild("UserNameText"); userNameText.text = UserInfoMgr.Instance.userConfig.Nick_name; cameraToggle_Switch = dlg.GetBreadthChild("CameraXRToggle_Switch"); micToggle_Switch = dlg.GetBreadthChild("MicXRToggle_Switch"); toggleGroupTran = dlg.GetBreadthChild("ResolutionToggleGroup"); framerateToggleGroup = dlg.GetBreadthChild("FramerateToggleGroup"); closeBtn = dlg.GetBreadthChild