{"id":484,"date":"2025-05-29T15:09:48","date_gmt":"2025-05-29T15:09:48","guid":{"rendered":"https:\/\/ouritsource.com\/blog\/?p=484"},"modified":"2025-05-29T15:20:31","modified_gmt":"2025-05-29T15:20:31","slug":"adding-background-music-to-a-game-in-unity-2d","status":"publish","type":"post","link":"https:\/\/ouritsource.com\/blog\/adding-background-music-to-a-game-in-unity-2d\/","title":{"rendered":"Adding Background Music to a Game in Unity 2D"},"content":{"rendered":"<body>\n<ol class=\"wp-block-list\">\n<li>In the Hierarchy Section, right-click to bring up pop-up menu and choose Create &gt; Audio &gt; Audio Source.<\/li>\n\n\n\n<li>In your project, create a new Folder called <strong>SoundFiles<\/strong>.<\/li>\n\n\n\n<li>Drag a WAV or MP3 Audio clip to the SoundFiles Folder. <\/li>\n\n\n\n<li>Then Drag that WAV or MP3 file from the SoundFiles Folder to the Audio Source \u201cAudioClip\u201d attribute. See image below.<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image size-full\"><img data-recalc-dims=\"1\" decoding=\"async\" width=\"639\" height=\"658\" src=\"https:\/\/i0.wp.com\/ouritsource.com\/blog\/wp-content\/uploads\/2025\/05\/image-3.png?resize=639%2C658&#038;ssl=1\" alt=\"\" class=\"wp-image-485\" loading=\"lazy\" srcset=\"https:\/\/i0.wp.com\/ouritsource.com\/blog\/wp-content\/uploads\/2025\/05\/image-3.png?w=639&amp;ssl=1 639w, https:\/\/i0.wp.com\/ouritsource.com\/blog\/wp-content\/uploads\/2025\/05\/image-3.png?resize=291%2C300&amp;ssl=1 291w\" sizes=\"auto, (max-width: 639px) 100vw, 639px\" \/><\/figure>\n\n\n\n<p>5. Check <strong>Loop<\/strong> if you would like music to have it continuously play.<\/p>\n<\/body>","protected":false},"excerpt":{"rendered":"<p>5. Check Loop if you would like music to have it continuously play.<\/p>\n","protected":false},"author":1,"featured_media":491,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[37],"tags":[],"class_list":["post-484","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-unity-games","has-thumbnail"],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/ouritsource.com\/blog\/wp-content\/uploads\/2025\/05\/ChatGPT-Image-May-29-2025-11_19_17-AM.png?fit=1024%2C1024&ssl=1","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/ouritsource.com\/blog\/wp-json\/wp\/v2\/posts\/484","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ouritsource.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ouritsource.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ouritsource.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ouritsource.com\/blog\/wp-json\/wp\/v2\/comments?post=484"}],"version-history":[{"count":1,"href":"https:\/\/ouritsource.com\/blog\/wp-json\/wp\/v2\/posts\/484\/revisions"}],"predecessor-version":[{"id":486,"href":"https:\/\/ouritsource.com\/blog\/wp-json\/wp\/v2\/posts\/484\/revisions\/486"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ouritsource.com\/blog\/wp-json\/wp\/v2\/media\/491"}],"wp:attachment":[{"href":"https:\/\/ouritsource.com\/blog\/wp-json\/wp\/v2\/media?parent=484"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ouritsource.com\/blog\/wp-json\/wp\/v2\/categories?post=484"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ouritsource.com\/blog\/wp-json\/wp\/v2\/tags?post=484"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}