Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
1WeekGameJam準備会 ゲームにサウンドをつけてみよう
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
zarakima
June 03, 2018
Programming
1.1k
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
1WeekGameJam準備会 ゲームにサウンドをつけてみよう
2018/06/03(日) 秋葉原Weeybleで行われた、 Unityもくもく勉強会×1週間ゲームジャム準備会のLT#2です。
zarakima
June 03, 2018
Transcript
28 slides
1WeekGameJam४උձ ήʔϜʹαϯυΛ͚ͭͯΈΑ͏ 2018.6.3 Weeyble Game
ࠓճͷ֓ཁ • ؆୯ͳࣗݾհ • ԻΛग़͢ • αϯυͷ͜ͱ͍ͭߟ͑Δʁ • SEͱBGMΛ͍͍ײ͡ʹ͢Δ •
Ի͕໐Βͳ͍ͱ͖ʙ
ࣗݾհ • zarakima • unityroom: ͍ͨ͋ͨΓΘ͍ͤ͘ ʢ͓: spaceʣ •
࠷ۙWeeybleʹΑ͘ग़ೖΓ͍ͯ͠Δਓ
ԻΛग़͢
ԻΛग़͢ ࠷ݶɺҎԼͷ3͕ͭඞཁ • AudioClipʢԻݯʣ • Audio Sourceʢίϯϙʔωϯτʣ • Audio Listenerʢίϯϙʔωϯτʣ
AudioClip • Իݯͷૉࡐͷ͜ͱ • AssetsϑΥϧμʹ ೖΕ͓ͯ͘ • ΠϯεϖΫλ͔Β Ի͕֬ೝͰ͖Δ ࠶ੜͰ͖Δʂ
Audio Source • Իݯ(AudioClip)Λ࠶ੜ ͢ΔͨΊͷίϯϙʔωϯτ • ԻΛ໐Β͍ͨ͠ɺ͔ͭ ݪଇήʔϜ్தͰফ͑ͳ͍ ήʔϜΦϒδΣΫτʹ ͜ͷίϯϙʔωϯτΛՃ
࠶ੜ͍ͨ͠"VEJP$MJQΛ ͜͜ʹೖΕΔ
Audio Listener • ԻΛฉͨ͘Ίͷίϯϙʔωϯτʢฉ͖खʣ • ʮγʔϯʹ͚̍ͭͩʯ͋Δͷ • Main Cameraʹ͚ͭͯ ͓͚Α͍
͋ΔλΠϛϯάͰԻΛग़͢ using System.Collections; using System.Collections.Generic; using UnityEngine; public class
SingleSound : MonoBehaviour { // Կ͔ʹͨͬͨΒ void OnTriggerEnter(Collider other) { // ԻΛग़͢ GetComponent<AudioSource>().Play(); } } AudioSourceʢͱAudioClip)͕Ճ͞Ε͍ͯΔήʔϜ ΦϒδΣΫτʹɺҎԼͷεΫϦϓτΛՃ͢Δ
ෳͷԻΛग़͢ using System.Collections; using System.Collections.Generic; using UnityEngine; public class
TripleSound : MonoBehaviour { public AudioClip enemySE; public AudioClip stoneSE; public AudioClip wallSE; private AudioSource audioSource; void Start() { audioSource = GetComponent<AudioSource>(); } void OnTriggerEnter(Collider other) { if (other.gameObject.tag == "enemy") { audioSource.PlayOneShot(enemySE); } else if (other.gameObject.tag == "stone") { audioSource.PlayOneShot(stoneSE); } else { audioSource.PlayOneShot(wallSE); } } }
αϯυͷ͜ͱɺ ͍ͭߟ͑Δʁ
αϯυͷ͜ͱ͍ͭߟ͑Δʁ • ΧοτͱγʔϯɿSEͱBGM • ԻݯΛ୳͢(͕͔͔࣌ؒΔ͔) • ԻݯͷϑΥʔϚοτ ʢࠓճʣਂ͘ߟ͑ͳͯ͘Α͍
SEͱBGM • SEɿήʔϜͷग़དྷࣄʹ߹Θͤͯग़͢ޮՌԻ • BGMɿϓϨΠதৗʹྲྀΕ͍ͯΔԻָ • ήʔϜΛʢେͬ͟ͺʹʣઃܭͨ͠ஈ֊Ͱɺ SEͱBGMͷ͕ʢͬ͘͟ΓʣѲͰ͖Δ
ԻݯΛ୳͢ • ຐԦࠢ https://maoudamashii.jokersounds.com/ • ޮՌԻϥϘ https://soundeffect-lab.info/ • UnityͪΌΜͷɿϘΠεύοΫ •
ʢࠓճʣཔΊΔʂʂ
ԻݯͷϑΥʔϚοτ • ࠓճ͍ήʔϜͳͷͰͳΜͰ͍͍ • .ogg/.mp3ѹॖ͞Ε͓ͯΓɺ࠶ੜ։࢝࣌ʹ CPUͷύϫʔΛ͏ɻ.wavѹॖ͞Ε͍ͯͳ͍ ͷͰ͍ԻͷಡΈࠐΈ࣌ʹ͕͔͔࣌ؒΔ͋Γ
SEͱBGMΛ͍͍ײ͡ʹ͢Δ
SEͱBGMΛ͍͍ײ͡ʹ͢Δ ԻΛઃఆͨ͠ঢ়ଶͰ ʮAudio MixerʯΛ͏ • Audio SourceΛάϧʔϓԽ͠ɺ·ͱΊͯѻ͑Δ • ͦΕΛར༻͠ɺSE͕໐ͬͨͱ͖ɺBGMͷԻྔΛ Ұ࣌తʹԼ͛ͨΓͰ͖Δ
Audio MixerΛ͏ • Audio MixerΛͭ͘Δ Create->Audio Mixer • Audio MixerΠϯυΛग़͢
ϝχϡʔɹWindow->Audio Mixer
Audio MixerΛ͏ • MasterͷԼʹࢠάϧʔϓΛ࡞ΔʢBGM/SEʣ BGMͱSEಉ͡֊ʹͳΔΑ͏ʹɻ ӈΫϦοΫ ʮ"EE$IJME(SPVQʯ
Audio MixerΛ͏ • ඍௐ͢Δલʹɺ֤ήʔϜΦϒδΣΫτͷ AudioSourceʮOutputʯʹάϧʔϓΛ ઃఆ͓͖ͯ͠·͢ʢΕ͍͢ͷͰҙʂʣ • ͜ͷঢ়ଶͰήʔϜΛ࣮ߦ͠Ի͕໐Δ͜ͱΛ֬ೝ
Audio MixerΛ͏ʢμοΩϯάʣ • SEͷμοΩϯά࠶ੜ ʢSEΛ࠶ੜ͢Δͱ͖ɺଞͷԻྔΛߜΔʣ #(.Լͷ"EEΛԡԼ͠ ʮ%VDL7PMVNFʯΛબ
υϥοά͠ %VDL7PMVNFͷԼ ͖ͭͮ Audio MixerΛ͏ʢμοΩϯάʣ
• SEʹSendΛઃఆ->ΠϯεϖΫλͷઃఆ 4&Լͷ"EEΛԡԼ͠ ʮ4&/%ʯΛબ Audio MixerΛ͏ʢμοΩϯάʣ
• BGMͷThresholdʢ͖͍͠ʣ BGMͱSE͕ಉ࣌࠶ੜ͞Ε͍ͯΔͱ͖ɺSEԻྔ͕ ͜ͷᮢΛ͍͑ͯΔؒμοΩϯάΛద༻͢Δ ࠨӈʹυϥοά͠ ͖͍͠Λௐ͢Δ Audio MixerΛ͏ʢμοΩϯάʣ
Audio MixerΛ͏ • શମͷϘϦϡʔϜΛௐ͢Δ • ήʔϜΛ࣮ߦ͠ɺԻΛฉ͖ͳ͕ΒThresholdͱ શମͷϘϦϡʔϜΛඍௐ͍ͯ͘͠ͱ͍͍ײ͡ʹ ֤߲ͷͭ·ΈͰ ϘϦϡʔϜௐ
Ի͕໐Βͳ͍ͱ͖
Ի͕໐Βͳ͍ͱ͖ • ίϯϙʔωϯτʢAudioSource/ AudioListenerʣ͍͍ͯΔ͔ʁ • AudioClipΛઃఆ͢ΔॴʢAudioSource εΫϦϓτͷΠϯεϖΫλʣʹઃఆ͍ͯ͠Δ͔ • AudioMixerΛ༻͍ͯ͠Δ߹ AudioSourceͷOutput֬ೝ
ͬͱৄ͍͠ࢿྉ • Unite2018 ʮAudioػೳͷجૅͱ࣮ςΫχοΫʯ https://www.slideshare.net/ UnityTechnologiesJapan002/unite- tokyo-2018audio
Other Decks in Programming
See All in Programming
TS 7.0 で baseUrl が使えなくなった今、パスエイリアスをどうするか
bicstone
2
640
そのデザイントークン、Flutterでも同じ見た目になりますか?
nakamizu
0
340
どうしても Eloquent でリポジトリパターンをやりたいんだ #phpcon_niigata / phpcon-niigata-2026
shogogg
0
130
高橋メソッドでCVE解説シリーズ 〜CVE-2026-112816〜
hakkadaikon
0
260
Next.js: The final boss of Web Performance
guaca
0
400
GraphQL の onError と Nullability のこれから
quramy
0
220
當我們開始不讀 Code - AI Agent 時代,Code Review 與 Clean Code 還剩下什麼?
jame2408
1
370
Spec-driven Development with AI
simas
PRO
0
2.3k
Vapor Mode でアクセシビリティは 壊れないか検証した話
fuqda
1
340
AI-Powered Domain-Driven Design
ziobrando
0
440
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
300
プロジェクトコードをキレイキレイしよう!暗黙的な参照を読み解く静的解析
ostk0069
0
210
Featured
See All Featured
Designing Powerful Visuals for Engaging Learning
tmiket
1
650
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
2
980
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
1
660
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.4k
Bootstrapping a Software Product
garrettdimon
PRO
306
120k
The SEO identity crisis: Don't let AI make you average
varn
0
630
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
3
1.4k
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
430
Music & Morning Musume
bryan
48
7.5k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.8k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
690
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
50
10k