Question by
Haci_enda · Mar 03 at 04:40 PM ·
c#unity 5programming
Gameobject wont set active
Here is the code (please don't wonder I'm german so the variables are in german too):
public void LippenVolumen() { audioManager.Play();
filmPanel.transform.GetChild(1).gameObject.SetActive(true);
volumenPanel.SetActive(true);
filmButtons.SetActive(true);
button2x.SetActive(true);
button1x.SetActive(false);
pauseButton.SetActive(true);
weiterButton.SetActive(false);
Animator filmanim = filmPanel.GetComponent<Animator>();
filmanim.SetTrigger("volumen");
filmanim.speed = 1;
falteButton.SetActive(false);
volumenButton.SetActive(false);
korrekturButton.SetActive(false);
}
So the first two lines (filmPanel.transform.GetChild(1).gameObject.SetActive(true); volumenPanel.SetActive(true);) both aren't working and I can't explain why. There are also NO arrors appearing while running the Code. Can anyone please help? I would really want to solve this.
Comment
Your answer
Follow this Question
Related Questions
Why is my script not working 1 Answer
Horizontal Input showing random decimal when it should be 0 0 Answers
Need help with c# 1 Answer
Delete item in inventory 0 Answers
Lerping Camera Between Two Points 0 Answers