- Home /
Question by
DriagonV · Aug 13, 2018 at 06:34 PM ·
c#scripting problemgameobject
Scripting Problem: Gameobject activation acting up,Objects are activating when they shouldn't be (please help this is for a jam in 4 hours)
why in here SmallerScreen3 activates straight after SmallerScreen1 then SmallerScreen2 activates without inactivating SmallerScreen3 then something activates again then LoseScreen Activates (Please help this is for a jam which is ending in 4 hours) if (collision.transform.GetChild(0).gameObject.layer == LayerMask.NameToLayer("BAD")) { if (!SmallerScreen1.activeSelf) { SmallerScreen1.SetActive(true); }else if (SmallerScreen1.activeSelf && !SmallerScreen2.activeSelf) { SmallerScreen1.SetActive(false); SmallerScreen2.SetActive(true); if (SmallerScreen2.activeSelf && !SmallerScreen3.activeSelf) { SmallerScreen2.SetActive(false); SmallerScreen3.SetActive(true); } else if (SmallerScreen3.activeSelf) { LoseScreen.SetActive(true); } }
Comment