- Home /
Initiating the playback of a toggle through another onClick button
,Hey, I am currently making my 3rd version of a simple music app. Its very simplistic right now, and I am currently trying to figure out why I cannot set an audioclip as a public var to initiate through a button click. The toggle is for a resources.load call. The toggle works, as you can see,
Currently, this is my code, for the toggle I have this script, and I am wondering if it is possible to set this code to global variable or not? Its very frustrating
If someone could help me figure this out. I know the audioSource needs to be initiated in a audioSource.PlayOneShot(a) method, but I am wondering if it is possible. Thanks
Your answer
Follow this Question
Related Questions
How to define component properties globally 1 Answer
how to make a variable in a script that do not apply to all prefab istances 1 Answer
Saving public variable data set in inspector? 1 Answer
Cannot assign Public GameObject variable in Inspector... 2 Answers
My public variables are gone after opening Unity the next day. 3 Answers