Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

access audio source from gameobject unity

AudioSource source1 = GameObject.FindGameObjectWithTag("GameObject1").GetComponent<AudioSource>();

GetComponent<AudioSource>().clip = source1.clip;
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #access #audio #source #gameobject #unity
ADD COMMENT
Topic
Name
2+7 =