[et_pb_section fb_built=”1″ _builder_version=”4.4.3″ background_image=”https://www.sovereignmoon.studio/wp-content/uploads/2020/07/moon.jpg”][et_pb_row column_structure=”3_5,2_5″ _builder_version=”4.4.3″ max_width=”1206px” max_width_tablet=”” max_width_phone=”” max_width_last_edited=”on|phone”][et_pb_column type=”3_5″ _builder_version=”4.4.3″][et_pb_text _builder_version=”4.4.3″ text_font=”Muli|300|||||||” text_text_color=”#e0d8c9″ text_font_size=”18px” text_line_height=”1.8em” header_font=”Abril Fatface||||||||” header_text_color=”#e0d8c9″ header_font_size=”42px” header_letter_spacing=”1px” header_line_height=”1.1em” header_3_font=”Raleway|200|||||||” header_3_text_color=”#e0d8c9″ header_3_font_size=”29px”]

SOVEREIGN MOON PRESENTS…

How to Add Background Music into a Unity 3D Game Kit Game

In this tutorial we’ll learn how to add background music into a Unity or 3D Game Kit game. Adding music to your scenes is easy. Simply follow these steps. 

[/et_pb_text][et_pb_button button_url=”#tutorial” button_text=”Read the Full Tutorial ?” _builder_version=”4.6.1″ custom_button=”on” button_text_size=”18px” button_text_color=”#353535″ button_bg_color=”#fff4af” button_border_width=”1px” button_border_color=”#d3d3d3″ button_letter_spacing=”1px” button_font=”Abril Fatface||||||||”][/et_pb_button][/et_pb_column][et_pb_column type=”2_5″ _builder_version=”4.4.3″][/et_pb_column][/et_pb_row][/et_pb_section][et_pb_section fb_built=”1″ custom_padding_last_edited=”on|phone” _builder_version=”4.4.3″ background_color=”#fcfcfc” module_alignment=”center” custom_margin=”||||false|false” custom_padding=”10px||10px||false|false” custom_padding_tablet=”” custom_padding_phone=”||||false|false” global_module=”1107″][et_pb_row column_structure=”1_5,3_5,1_5″ _builder_version=”4.4.3″ max_width=”998px” custom_margin=”|||150px|false|false” custom_margin_tablet=”” custom_margin_phone=”|||auto|false|false” custom_margin_last_edited=”on|phone”][et_pb_column type=”1_5″ _builder_version=”4.4.3″ custom_padding_tablet=”” custom_padding_phone=”|125px|||false|false” custom_padding_last_edited=”on|phone”][et_pb_image src=”https://www.sovereignmoon.studio/wp-content/uploads/2020/08/smlogo2.png” align=”center” src_tablet=”” src_phone=”” src_last_edited=”on|phone” align_tablet=”” align_phone=”left” align_last_edited=”on|phone” _builder_version=”4.4.3″ width=”100%” max_width=”48%” module_alignment=”right” custom_margin=”||||false|false” custom_margin_tablet=”” custom_margin_phone=”” custom_margin_last_edited=”on|phone” custom_padding=”|0px||0px|false|true” border_radii=”on|90px|90px|90px|90px”][/et_pb_image][/et_pb_column][et_pb_column type=”3_5″ _builder_version=”4.4.3″ custom_padding_tablet=”” custom_padding_phone=”||||false|false” custom_padding_last_edited=”on|phone”][et_pb_text _builder_version=”4.6.1″ text_font=”Muli|300|||||||” text_font_size=”17px”]

Sovereign Moon Studios is dedicated to helping space enthusiasts bring their creative visions to life. We are the publisher of the Web’s most loved NoCode space game design course. ⚡ Learn more here

[/et_pb_text][/et_pb_column][et_pb_column type=”1_5″ _builder_version=”4.4.3″][/et_pb_column][/et_pb_row][/et_pb_section][et_pb_section fb_built=”1″ _builder_version=”4.4.3″ background_image=”https://www.sovereignmoon.studio/wp-content/uploads/2020/08/space-blog.png” background_size=”initial” background_position=”top_right” custom_margin=”5px||0px||false|false” custom_padding=”5px||0px||false|false” background_last_edited=”on|phone” background_enable_image_tablet=”off”][et_pb_row column_structure=”3_4,1_4″ _builder_version=”4.4.3″ custom_margin=”25px||||false|false” custom_padding=”5px||||false|false”][et_pb_column type=”3_4″ _builder_version=”4.4.3″][et_pb_text _builder_version=”4.6.1″ text_font=”Muli|300|||||||” text_font_size=”18px” text_line_height=”1.8em” header_font=”Abril Fatface|700|||||||” header_text_color=”#0a0001″ header_font_size=”42px” header_line_height=”1.4em” header_2_font=”Abril Fatface||||||||” header_2_font_size=”33px” header_2_letter_spacing=”1px” header_2_line_height=”1.1em” header_3_font=”Abril Fatface||||||||” header_3_text_color=”#565656″ header_3_font_size=”26px” header_3_line_height=”1.8em” header_3_font_size_tablet=”” header_3_font_size_phone=”20px” header_3_font_size_last_edited=”on|phone”]

How to Add Background Music into Your Game (No Coding Required).

Today, Sovereign Moon Studios, the makers of your favorite NoCode game development course, are excited to bring you a new tutorial that will walk you through the steps of adding background music into your Unity 3D Game Kit game. Adding music into your game’s scenes is easy and my goal for this tutorial is to help you setup background music for your game in about 5 minutes

Let’s jump in!

Introduction:

If you’re new to Unity or 3D Game Kit, at some point you’re going to want to learn how to add music into your game scene. Music can really help you support the emotion you’re trying to convey within your scene. Luckily, within Unity and 3D Game Kit, the process of adding music is really easy. 

How to Add Music

To add music into your game, you simply need two new elements. You need an audio listener and an audio source

Audio listener: Think of an audio listener as the element within your game that hears your music. Essentially, this is the part of your world that captures the sounds that are being produced in your game. For example, if your character walks past a portal, that portal might emit a gentle buzzing or electric sound. Something within your game needs to hear those sounds. In most cases, game developers will add their audio listener to their camera. This is because in most games the camera follows the character around and therefore the sounds that are emitted will be picked up and registered by the camera which shares the perspective of the player. Therefore, all game sounds will appear to surround the character from their proper position within 3D space. 

Audio source: An audio source is simply object within your game that is producing or emitting sound. That sound could be a sound effect, folly, atmosphere, room tone, dialoge or music. 

Now, all we need to do is add an audio listener and audio source to our Unity game. 

[/et_pb_text][/et_pb_column][et_pb_column type=”1_4″ _builder_version=”4.4.3″][/et_pb_column][/et_pb_row][/et_pb_section][et_pb_section fb_built=”1″ _builder_version=”4.4.3″ background_image=”https://www.sovereignmoon.studio/wp-content/uploads/2020/08/space-blob2.png” background_size=”initial” background_position=”center_left” custom_margin=”0px||0px||false|false” custom_padding=”0px||0px||false|false”][et_pb_row column_structure=”3_4,1_4″ _builder_version=”4.4.3″ custom_margin=”0px||0px||false|false” custom_padding=”0px||0px||false|false”][et_pb_column type=”3_4″ _builder_version=”4.4.3″][et_pb_image src=”https://www.sovereignmoon.studio/wp-content/uploads/2020/09/adding-music-to-unity.jpg” alt=”adding music to unity” title_text=”adding music to unity” _builder_version=”4.6.1″ custom_margin=”0px||0px||false|false” custom_padding=”0px||0px||false|false” border_radii=”on|10px|10px|10px|10px”][/et_pb_image][et_pb_text _builder_version=”4.6.1″ text_font=”Muli|300|||||||” text_font_size=”18px” text_line_height=”1.8em” header_font=”Abril Fatface|700|||||||” header_text_color=”#0a0001″ header_font_size=”42px” header_2_font=”Abril Fatface||||||||” header_2_font_size=”33px” header_2_letter_spacing=”1px” header_2_line_height=”1.1em” header_3_font=”Abril Fatface||||||||” header_3_text_color=”#565656″ header_3_font_size=”26px” header_3_line_height=”1.8em” custom_padding=”35px||35px||false|false” header_3_font_size_tablet=”” header_3_font_size_phone=”20px” header_3_font_size_last_edited=”on|phone”]

The first thing we need to do is we need to add an audio listener. Within 3D Game Kit, the audio listener is already added to our game camera. If you go into the hierarchy tab and search for “camera” and then select “camera brain” (see image above) you will notice that the camera is already equipped with an audio listener.

adding music 3d game kit

If you do not have this component added to your game yet, you can simply scroll to the bottom of the inspector tab and click “add component” and search for “audio listener”.

unity audio listener

Next, all we need to do is add our music into the game

Adding the Source of the Sound

The source of the game music can be anything. Obviously, if you had a music emitting object like a radio, television or sound system, you would want to associate your game’s music with those object. Remember, because our audio listener is connected to our camera, the audio will change depending on our character’s position in relation to those objects. For example, in 3D space, the sound will appear more distant if our character is futher away from those objects, and louder if the character is closer.

However, in todays tutorial we want to focus on adding background scene music into the game that remains consistent throughout the entire game. In order to do this, we need to set our character as the sound source. Essentially, our character will be emitting the sound of the music and our camera will be listening to the sound.

Within Unity’s 3d Game Kit, we need to go to our heierachy tab and search for our character. In our case we need to search for “Ellen” since this is our main character’s name. However, if you’re not using 3D Game Kit you’ll need to search for your character’s name.

Once Ellen is selected, we can go over into the inspector tab. Currently there is no audio source added to her character so we need to do that now. To add an audio source, simply scroll to the bottom of the inspector tab and click on “add component”. Search for and select “audio source”.

3d game kit music

Once you have added an audio source to the player we can start setting up our background music.

Adding Background Music into Unity

All we have left to do is modify a few settings in the audio source component section.

The first thing we need to do is add our clip. Unity supports many audio file formats including mp3, WAV, MPEG, OGG Vorbis, AIFF, MOD, IT, S3M and XM.

You’ll also want to ensure that “loop” is selected so the music continues to loop in the background while your character is in the game world.

You’ll also want to select “play on awake” so that the music begins as soon as your character spawns.

Lastly, you’ll want to adjust your volume and set your music to play in 2D or 3D space. For this tutorial, we’re not adding any directionality to our source so we’ll set it to 2D space. Your audio source section should look something like this.

how to add music to Unity 3d game kit

Once we’ve completed all of these steps we can play our game and the music will be added to our scene.

Conclusion

So  that’s it. I hope you’ve enjoyed this tutorial.

Remember, if you’re trying to take your n0-code game development skills to the next level, consider enrolling in our n0-code game development course where you’ll learn how to make breathtaking video games without having to know how to code or how to draw.

[/et_pb_text][/et_pb_column][et_pb_column type=”1_4″ _builder_version=”4.4.3″][/et_pb_column][/et_pb_row][/et_pb_section][et_pb_section fb_built=”1″ custom_padding_last_edited=”on|phone” _builder_version=”4.4.3″ background_color=”#fcfcfc” module_alignment=”center” custom_margin=”0px||0px||false|false” custom_padding=”||0px||false|false” custom_padding_tablet=”” custom_padding_phone=”||||false|false” global_module=”1106″][et_pb_row column_structure=”1_5,3_5,1_5″ _builder_version=”4.6.1″ max_width=”998px” custom_margin=”|||150px|false|false” custom_margin_tablet=”” custom_margin_phone=”|||auto|false|false” custom_margin_last_edited=”on|phone”][et_pb_column type=”1_5″ _builder_version=”4.4.3″ custom_padding_tablet=”” custom_padding_phone=”|125px|||false|false” custom_padding_last_edited=”on|phone”][et_pb_image src=”https://www.sovereignmoon.studio/wp-content/uploads/2020/08/smlogo2.png” align=”center” src_tablet=”” src_phone=”” src_last_edited=”on|phone” align_tablet=”” align_phone=”left” align_last_edited=”on|phone” _builder_version=”4.4.3″ width=”100%” max_width=”48%” module_alignment=”right” custom_margin=”||||false|false” custom_margin_tablet=”” custom_margin_phone=”” custom_margin_last_edited=”on|phone” custom_padding=”|0px||0px|false|true” border_radii=”on|90px|90px|90px|90px”][/et_pb_image][/et_pb_column][et_pb_column type=”3_5″ _builder_version=”4.4.3″ custom_padding_tablet=”” custom_padding_phone=”||||false|false” custom_padding_last_edited=”on|phone”][et_pb_text _builder_version=”4.6.1″ text_font=”Muli|300|||||||” text_font_size=”17px”]

Sovereign Moon Studios is dedicated to helping space enthusiasts bring their creative visions to life. We are the publisher of the Web’s most loved NoCode space game design course. ⚡ Learn more here

[/et_pb_text][/et_pb_column][et_pb_column type=”1_5″ _builder_version=”4.4.3″][/et_pb_column][/et_pb_row][/et_pb_section][et_pb_section fb_built=”1″ _builder_version=”4.4.3″ background_color=”rgba(10,0,1,0.98)” global_module=”1039″][et_pb_row column_structure=”1_2,1_2″ _builder_version=”4.4.3″ width=”84%” max_width=”1191px”][et_pb_column type=”1_2″ _builder_version=”4.4.3″][et_pb_text _builder_version=”4.6.1″ text_font=”Muli|300|||||||” text_text_color=”#e0dad2″ text_font_size=”18px” text_line_height=”1.8em” header_font=”Abril Fatface||||||||” header_text_color=”#e0d8c9″ header_font_size=”33px” header_line_height=”1.1em” custom_padding=”5px||||false|false”]

Hi! We’re Sovereign Moon Studios

Do you love space design? So do we! For this reason, we created a NoCode space / sci-fi game development course that walks you through the process of bringing your futuristic space visions to life without needing to know how to program and without having to be an artist. 

[/et_pb_text][et_pb_button button_url=”/” button_text=”Learn More ?” _builder_version=”4.4.3″ custom_button=”on” button_text_size=”18px” button_text_color=”#fff4af” button_bg_color=”rgba(255,244,175,0)” button_border_width=”1px” button_border_color=”#fff4af” button_letter_spacing=”1px” button_font=”Abril Fatface||||||||”][/et_pb_button][/et_pb_column][et_pb_column type=”1_2″ _builder_version=”4.4.3″][et_pb_text _builder_version=”4.6.1″][/et_pb_text][/et_pb_column][/et_pb_row][/et_pb_section]