using UnityEngine.UI; using UnityEngine; //using UnityEngine.AddressableAssets; ///using UnityEngine.ResourceManagement.AsyncOperations; //using UnityEngine.U2D; public class Control : MonoBehaviour { private GameObject Sel; void Start() { DOIT.AllTogchildfalse(Get.o1("AdminSoftClorPnl/BTNSTOP")); } public void selection(string sel) { DOIT.AllTogchildfalse(Get.o1("AdminSoftClorPnl/BTNSTOP")); DOIT.AllChildOff(Get.o1("AdminSoftClorPnl/SELECTION")); print(sel); Get.o2("AdminSoftClorPnl/SELECTION",sel).SetActive(true); if(sel=="YOURLOGO"){ Get.o2("AdminSoftClorPnl/SELECTION",sel).transform.localPosition=new Vector3(3.72f,5.58f,0); } if(sel=="SOFTCOLOR"){ Get.o2("AdminSoftClorPnl/SELECTION",sel).transform.localPosition=new Vector3(181.6f,0,0); //Add Color Picker } if(sel=="BACKGROUND") { Get.o2("AdminSoftClorPnl/SELECTION",sel).transform.localPosition=new Vector3(-468.9f,-4.84f,0); //Addressables.LoadAssetAsync("Backgrounds").Completed += Face_Completed; } } // void Face_Completed(AsyncOperationHandle handleC) // { // if (handleC.Status == AsyncOperationStatus.Succeeded) // { // GameObject BTN=GameObject.Find("HIDER").transform.Find("BTNBGMODEL").gameObject; // GameObject content=Get.o1("AdminSoftClorPnl/SELECTION/BACKGROUND/MODEL/Viewport/ContentBackground"); // _A.Backgrounds = handleC.Result; // for(int i=1; i<25; i++) // { // Sel = Instantiate(BTN); // Sel.transform.Find("Image").transform.Find("Text").gameObject.GetComponent().text = i.ToString(); // Sel.transform.SetParent(content.transform, false ); // Sel.name = "BG."+i.ToString(); // Sel.SetActive(true); // Sel.transform.Find("Background").GetComponent().sprite = _A.Backgrounds.GetSprite(Sel.name); // } // Addressables.Release(handleC.Result); // } // } }