private void Awake() { int type = Random.Range(1, 3); int CaseTpye = type; switch (CaseTpye) { case 1: Skin1.SetActive(true); break; case 2: Skin2.SetActive(true); break; case 3: Skin3.SetActive(true); break; } }
// Update is called once per frame void Update() { if (selectSkin1 == 1) { Skin1.SetActive(true); Skin2.SetActive(false); Skin3.SetActive(false); Skin4.SetActive(false); Skin5.SetActive(false); } else { Skin1.SetActive(false); } if (selectSkin2 == 2) { Skin1.SetActive(false); Skin2.SetActive(true); Skin3.SetActive(false); Skin4.SetActive(false); Skin5.SetActive(false); } else { Skin2.SetActive(false); } if (selectSkin3 == 3) { Skin1.SetActive(false); Skin2.SetActive(false); Skin3.SetActive(true); Skin4.SetActive(false); Skin5.SetActive(false); } else { Skin3.SetActive(false); } if (selectSkin4 == 4) { Skin1.SetActive(false); Skin2.SetActive(false); Skin3.SetActive(false); Skin4.SetActive(true); Skin5.SetActive(false); } else { Skin4.SetActive(false); } if (selectSkin5 == 5) { Skin1.SetActive(false); Skin2.SetActive(false); Skin3.SetActive(false); Skin4.SetActive(false); Skin5.SetActive(true); } else { Skin5.SetActive(false); } }