Hi,
tugle = GameObject.FindGameObjectWithTag("musicToggle")
In this it is giving error" it cannot convert GameObject to Toggle" because you have taken **tugle to be toggle object** and assigning it a gameObject which is wrong.
You should probably do -
1) Assign tugle from inspector.
or
tugle = GameObject.FindGameObjectWithTag("musicToggle").GetComponent();`
hope it works for u.
↧