using UnityEngine; using UnityEngine.UI; public class Splash : MonoBehaviour { public void AddUnique() { string tog = Get.ToggleOnInChild("EDITCABpnl/EDITOR/ColorSelectionList"); //print("tog=="+tog); if (tog != "NONE") { string CAT = _G.OBJs[_G.nO][4];//Category B1,B2... string[] SC = _G.OBJs[_G.nO][55].Split(","[0]);//Splash Global if (GameObject.Find("mL")) SC[0] = DOIT.CSs(GameObject.Find("mL").GetComponent().text); if (GameObject.Find("mH")) SC[1] = DOIT.CSs(GameObject.Find("mH").GetComponent().text); if (GameObject.Find("mR")) SC[2] = DOIT.CSs(GameObject.Find("mR").GetComponent().text); if (GameObject.Find("mB")) SC[3] = DOIT.CSs(GameObject.Find("mB").GetComponent().text); if (CAT == "W4" || CAT == "B2" || CAT == "B9" || CAT == "W2" || CAT == "B4") { if (GameObject.Find("mHR")) SC[1] = DOIT.CSs(GameObject.Find("mHR").GetComponent().text); if (GameObject.Find("mBR")) SC[3] = DOIT.CSs(GameObject.Find("mBR").GetComponent().text); SC[0] = "0"; } if (CAT == "W5" || CAT == "B3" || CAT == "B10" || CAT == "W3" || CAT == "B5") { if (GameObject.Find("mHL")) SC[1] = DOIT.CSs(GameObject.Find("mHL").GetComponent().text); if (GameObject.Find("mBL")) SC[3] = DOIT.CSs(GameObject.Find("mBL").GetComponent().text); SC[2] = "0"; } _G.OBJs[_G.nO][55] = SC[0] + "," + SC[1] + "," + SC[2] + "," + SC[3]; _G.OBJs[_G.nO][55] = _G.OBJs[_G.nO][55].Replace(" ", ""); if (CAT == "W4" || CAT == "B2" || CAT == "B9" || CAT == "W2" || CAT == "B4") { string[] SC2 = _G.OBJs[_G.nO][56].Split(","[0]); if (GameObject.Find("mL")) SC2[0] = DOIT.CSs(GameObject.Find("mL").GetComponent().text); if (GameObject.Find("mH")) SC2[1] = DOIT.CSs(GameObject.Find("mH").GetComponent().text); if (GameObject.Find("mR")) SC2[2] = DOIT.CSs(GameObject.Find("mR").GetComponent().text); if (GameObject.Find("mB")) SC2[3] = DOIT.CSs(GameObject.Find("mB").GetComponent().text); if (GameObject.Find("mHL")) SC2[1] = DOIT.CSs(GameObject.Find("mHL").GetComponent().text); if (GameObject.Find("mBL")) SC2[3] = DOIT.CSs(GameObject.Find("mBL").GetComponent().text); SC[2] = "0"; _G.OBJs[_G.nO][56] = SC2[0] + "," + SC2[1] + "," + SC2[2] + "," + SC2[3]; _G.OBJs[_G.nO][56] = _G.OBJs[_G.nO][56].Replace(" ", ""); } if (CAT == "W5" || CAT == "B3" || CAT == "B10" || CAT == "W3" || CAT == "B5") { string[] SC2 = _G.OBJs[_G.nO][55].Split(","[0]); if (GameObject.Find("mL")) SC2[0] = DOIT.CSs(GameObject.Find("mL").GetComponent().text); if (GameObject.Find("mH")) SC2[1] = DOIT.CSs(GameObject.Find("mH").GetComponent().text); if (GameObject.Find("mR")) SC2[2] = DOIT.CSs(GameObject.Find("mR").GetComponent().text); if (GameObject.Find("mB")) SC2[3] = DOIT.CSs(GameObject.Find("mB").GetComponent().text); if (GameObject.Find("mHR")) SC2[1] = DOIT.CSs(GameObject.Find("mHR").GetComponent().text); if (GameObject.Find("mBR")) SC2[3] = DOIT.CSs(GameObject.Find("mBR").GetComponent().text); SC[0] = "0"; _G.OBJs[_G.nO][56] = SC2[0] + "," + SC2[1] + "," + SC2[2] + "," + SC2[3]; _G.OBJs[_G.nO][56] = _G.OBJs[_G.nO][56].Replace(" ", ""); } _G.OBJs[_G.nO][54] = UIT.Global(Header.Splash, _G.G); //if(tog!="SETCOL" ){ DestroyImmediate(GameObject.Find(SceneModeManager.SelectedName)); switch (_G.OBJs[_G.nO][4]) { case "B1": ConstructBASE.AddCab(_G.nO); break; case "B2": ConstructCORNERBASE.AddCab(_G.nO); break; case "B3": ConstructCORNERBASE.AddCab(_G.nO); break; case "B4": ConstructCORNERBASE.AddCab(_G.nO); break; case "B5": ConstructCORNERBASE.AddCab(_G.nO); break; case "B9": ConstructCORNERBASE.AddCab(_G.nO); break; case "B10": ConstructCORNERBASE.AddCab(_G.nO); break; case "W1": ConstructWALL.AddCab(_G.nO); break; case "W4": ConstructCORNERWALL.AddCab(_G.nO); break; case "W5": ConstructCORNERWALL.AddCab(_G.nO); break; case "T1": ConstructTALL.AddCab(_G.nO); break; case "frid": ConstructFRIDGE.AddFridge(_G.nO); break; case "stov": ConstructStove.AddStove(_G.nO); break; case "dish": ConstructDishwasher.AddDishwasher(_G.nO); break; case "hood": ConstructHood.AddHood(_G.nO); break; case "wind": ConstructWindow.AddWindow(_G.nO); break; } //DASH.REFRESH(); DOIT.CloseALLPNL(); // //} // if(tog=="SETCOL" ){ // Get.o2("Canvas/Panel_SCENE/PNL","TEXTUREPNL").SetActive(true); // //TEXTURESPNL.StartPNL("Splash"); // Get.o1("Panel_SCENE/PNL/EDITCABpnl").SetActive(false); // } GameObject.Find("HIDER").transform.Find("LoadingCircle").gameObject.SetActive(false); } } public void NONESET() { if (GameObject.Find("mL")) GameObject.Find("mL").GetComponent().text = "0"+_G.Sys; else if (GameObject.Find("mH")) GameObject.Find("mH").GetComponent().text = "0" + _G.Sys; else if (GameObject.Find("mR")) GameObject.Find("mR").GetComponent().text = "0" + _G.Sys; else if (GameObject.Find("mB")) GameObject.Find("mB").GetComponent().text = "0" + _G.Sys; else if (GameObject.Find("mHL")) GameObject.Find("mHL").GetComponent().text = "0" + _G.Sys; else if (GameObject.Find("mBL")) GameObject.Find("mBL").GetComponent().text = "0" + _G.Sys; else if (GameObject.Find("mHR")) GameObject.Find("mHR").GetComponent().text = "0" + _G.Sys; else if (GameObject.Find("mBR")) GameObject.Find("mBR").GetComponent().text = "0" + _G.Sys; } }