Unity Ninja Unity 3D Forum
To have exclusive access to all downloads, recourses and links within this forum, a free registered account is required. Just a heads up Wink

You are not connected. Please login or register

Unity Ninja Unity 3D Forum » HELP » Help (General) » How do i add music?

How do i add music?

View previous topic View next topic Go down  Message [Page 1 of 1]

1 How do i add music? on Wed Oct 22, 2014 8:29 pm

Kunoru


Member [Lv. 2]
Member [Lv. 2]
Hey guys, I was wondering if anyone knows how to have music playing in the background of a game and if they are any way to have it play at a certain time. Help is much appreciated.

View user profile

2 Re: How do i add music? on Wed Oct 22, 2014 10:49 pm

Set up an audio source on the object itself (can be any GO) with your audio listener. Have that source handle all the music for the game, and it should have a constant volume in all speakers. You can also set up an audio source somewhere in the world with a rolloff factor of 0. You'll run into it shifting from speaker to speaker depending on where it is relative to you, though. In terms of a certain time, can you be more specific? I can help you with that.

View user profile http://www.youtube.com/user/misterninjaboy

3 Re: How do i add music? on Thu Oct 23, 2014 8:11 pm

Kunoru


Member [Lv. 2]
Member [Lv. 2]
What i mean by certain time is making music play during an event or when the player does an action or enter an area like the music in slender gets increasingly louder and dramatic as you progress and the drum sound effect occurs when you see him.

View user profile

4 Re: How do i add music? on Sun Oct 26, 2014 12:52 pm

BryceCain25


SUPER MODERATOR
SUPER MODERATOR
Kunoru wrote:What i mean by certain time is making music play during an event or when the player does an action or enter an area like the music in slender gets increasingly louder and dramatic as you progress and the drum sound effect occurs when you see him.
Use triggers with the audio source..
something like "OnTriggerStay () { AudioSource.Play(); } OnTriggerExit () { AudioSource.Stop(); }"

View user profile

5 Re: How do i add music? on Tue Oct 28, 2014 8:01 pm

Kunoru


Member [Lv. 2]
Member [Lv. 2]
Thanks for the help. ^_^

View user profile

6 Re: How do i add music? on Sun Nov 09, 2014 6:01 pm

BryceCain25


SUPER MODERATOR
SUPER MODERATOR
Kunoru wrote:Thanks for the help. ^_^
Sure thing Smile

View user profile

View previous topic View next topic Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum