SlideShare a Scribd company logo
Lecture 6: Music and Sound Effect

& GVR Try out.
Dr. Kobkrit Viriyayudhakorn

iApp Technology Limited

kobkrit@iapp.co.th
ITS488 (Digital Content Creation with Unity - Game and VR Programming)
Starter Project
https://github.com/kobkrit/VR_basketball
Sound Effect
Getting Resource from Unity Asset Store
Audio Kit
Download Audio Kit at 

http://bit.ly/2iVDB7v
Import Audio Kit
1. Menu Bar > Assets > Import Package > Custom Package...
2. Select the "AudioKit.unitypackage"
3. Make sure that all files 

are selected, and then

Press "Import"
Imported Audio
Press to Play
Adding Music to the Game
1. Select "Scene 1". Right click at

Hierarchy > Audio > Audio Source
2. Drag the "music...come..."

to the Audio Source
Configure the Music
1. Select Audio Source

2. Checked at 

• Play On Awake

• Loop

3. Run "Play" to Test.
Exercise 1: Add a sound to Game Over.
• Find the sound that seems most appropriate to you.

• Should it be looping or not?

• Add the audio source to the Game Over scene.
Adding Sound Effect to Ball
1. Open the Scene 2 > ShootHoopKit > 

Drag the ball to the Hierarchy windows
2. Select the ball at the right inspector windows >

Add Component > Audio Source
3. The attached audio source

is added into the Ball Game object
Trigger Sound Effect by Code
1. Drag a drop Sound file. the impact_deep_thud_bounce
sound file into the AudioClip
2. Add the new C# script, "BallBounceSound.cs"
BallBounceSound.cs
2. Drag the BallBounceSound.cs to attached 

with the ball game object. >>
1. Writing the above code.
Trigger Sound Effect by Code
Make the customized ball as the prefab
1. Press "Play" now, We will heard 

only the single drop of sounds.

Even you firing multiple ball.
2. Drag the customized ball as 

the ball prefab.
3. Press Play again.

Now you will heard multiple

drop sounds.
Exercise 2: Adding a scoring sound.
• Add an audio source component.

• Find a good scoring sound.

• Trigger in the appropriate place.
Solution for Exercise 2
• Enter the ScoreCount.cs, Add the AudioSource part at IncreaseScore Function.
1. Select "ScoreCount" Game Object,

At the inspector windows, Add "Audio source".
2. Drag and drop "Chime_ball_02" at the AudioClip part.

Unchecked "Play On Awake checkbox.
Play with sound time.
ITS488 Lecture 6: Music and Sound Effect & GVR Try out.
Make our life easier with Google VR SDK
ITS488 Lecture 6: Music and Sound Effect & GVR Try out.
Google VR Installation
• https://developers.google.com/vr/unity/download
Making a new project
Import GVR unity package
1. Assets > Import Package > Custom Package....
2. Select GoogleVRForUnity_1.110.0.unitypackage
3. Make sure that all items are checked

and then "Import"
Google VR Demo
Play around with GVR Demo
1. File > Build Settings...
1. Tap "Add Open Scenes"
2. Select iOS
3. Click "Switch Platform"
Change to Virtual Reality Project
1. Click on "Player Settings"
2. At the XR Settings,

Select "Virtual Reality
Supported"
and Add "Cardboard" to
Virtual Reality SDK
Test on iOS
1. Connect with iOS phone to the machine.

2. Press "Build and Run"
Fast VR project using GVR
1. Create a New Empty Scene
2. Add Cube into the Scene,

Make it in front of the Camera
3. Play

You can not move any view.
1. Go to Google VR Assets > Prefabs
Using GVR Prefab
2. Import the prefab like this...
Now you can move in VR
• Shift + Move Mouse = Change Orientation
• Shift + Left Mouse Button = ClickButton
• Shift + Right Mouse Button = AppButton
• Shift + Middle Mouse Button = HomeButton/Recenter
• Shift + Ctrl = IsTouching
• Shift + Ctrl + Move Mouse = Change TouchPos
There is much more in Google VR
• A simple reticle prefab and associated scripts for gaze-based user interaction.

• User head tracking.

• Side-by-side stereo rendering.

• Detecting user interaction with the system (via trigger or controller).

• Automatic stereo configuration for a specific VR viewer.

• Distortion correction for a VR viewer's lenses.

• An alignment marker to help center the screen under the lenses when you insert your phone into
a viewer.

• Automatic gyro drift correction.
Q/A

More Related Content

PDF
Lecture 4: ITS488 Digital Content Creation with Unity - Game and VR Programming
PDF
Lecture 2: C# Programming for VR application in Unity
PDF
Lecture 1 Introduction to VR Programming
PDF
ITS488 Lecture 4: Google VR Cardboard Game Development: Basket Ball Game #2
PDF
Unity Google VR Cardboard Deployment on iOS and Android
PPTX
Unity - Building Your First Real-Time 3D Project - All Slides
PPTX
Unity - Essentials of Programming in Unity
PPTX
Gamemaker views
Lecture 4: ITS488 Digital Content Creation with Unity - Game and VR Programming
Lecture 2: C# Programming for VR application in Unity
Lecture 1 Introduction to VR Programming
ITS488 Lecture 4: Google VR Cardboard Game Development: Basket Ball Game #2
Unity Google VR Cardboard Deployment on iOS and Android
Unity - Building Your First Real-Time 3D Project - All Slides
Unity - Essentials of Programming in Unity
Gamemaker views

What's hot (15)

PPTX
GameMaker 1) intro to gamemaker
PPTX
Gamemaker lesson 1
PPT
Pb works howto
PPTX
S02.W02 - Some New Features of Windows
PPTX
DIY Mobile VR with Unity 3d & Cardboard SDK
PDF
Unity 2D game development
PPTX
How to fake a database/backend in Axure... and more
PDF
Making apps for the Apple TV
PPTX
Lecture5
PPT
What Is A Game Engine
PPTX
Car racing game for android
PPTX
Android Game Minisyonize
PPTX
Developing Virtual Reality Application using Google Cardboard
PPTX
Operating System.pptx
PDF
Crucifixion christ with hands reaching out power point slides and ppt diagram...
GameMaker 1) intro to gamemaker
Gamemaker lesson 1
Pb works howto
S02.W02 - Some New Features of Windows
DIY Mobile VR with Unity 3d & Cardboard SDK
Unity 2D game development
How to fake a database/backend in Axure... and more
Making apps for the Apple TV
Lecture5
What Is A Game Engine
Car racing game for android
Android Game Minisyonize
Developing Virtual Reality Application using Google Cardboard
Operating System.pptx
Crucifixion christ with hands reaching out power point slides and ppt diagram...
Ad

Similar to ITS488 Lecture 6: Music and Sound Effect & GVR Try out. (20)

PPTX
VIRTUAL REALITY & AUGMENTED REALITY
PDF
Building VR Applications For Google Cardboard
PPTX
November.2015.RealityBasedUI
PDF
Developing AR and VR Experiences with Unity
PDF
Cardboard VR: Building Low Cost VR Experiences
PPTX
Getting started with immersive technologies
PDF
Developing VR Experiences with Unity
PPTX
Unity Basics and Mobile VR
PPTX
UX and Interaction in Virtual Reality
PDF
Bringing Dynamic Spatial Sound Into Your VR,AR Experiences At Scale
PPTX
Virtual reality
PDF
Building AR and VR Experiences
PPTX
[DevDay2018] Developing for VR/AR with Unity - By: Tu Phan and VR/AR Team, De...
PPTX
Audios in Unity
PDF
Developing VR in Unity
PPTX
XNA in a Day
PPTX
Augmented Reality (AR) in Your Library
PDF
STEM Camp Virtual Reality
PDF
Mobile AR Tutorial
PPT
Introduction-to-Unity.ppt
VIRTUAL REALITY & AUGMENTED REALITY
Building VR Applications For Google Cardboard
November.2015.RealityBasedUI
Developing AR and VR Experiences with Unity
Cardboard VR: Building Low Cost VR Experiences
Getting started with immersive technologies
Developing VR Experiences with Unity
Unity Basics and Mobile VR
UX and Interaction in Virtual Reality
Bringing Dynamic Spatial Sound Into Your VR,AR Experiences At Scale
Virtual reality
Building AR and VR Experiences
[DevDay2018] Developing for VR/AR with Unity - By: Tu Phan and VR/AR Team, De...
Audios in Unity
Developing VR in Unity
XNA in a Day
Augmented Reality (AR) in Your Library
STEM Camp Virtual Reality
Mobile AR Tutorial
Introduction-to-Unity.ppt
Ad

More from Kobkrit Viriyayudhakorn (20)

PDF
Thai E-Voting System
PPTX
Thai National ID Card OCR
PPTX
Chochae Robot - Thai voice communication extension pack for Service Robot
PDF
ศักยภาพของ AI สู่โอกาสใหม่แห่งการแข่งขันและความสำเร็จ (Thai AI updates in yea...
PDF
Thai Text processing by Transfer Learning using Transformer (Bert)
PDF
How Emoticon Affects Chatbot Users
PPTX
หัวใจของปัญญาประดิษฐ์ (Gradient Descent ทำงานอย่างไร)
PDF
Check Raka Chatbot Pitching Presentation
PPTX
[Lecture 3] AI and Deep Learning: Logistic Regression (Coding)
PPTX
[Lecture 4] AI and Deep Learning: Neural Network (Theory)
PPTX
[Lecture 2] AI and Deep Learning: Logistic Regression (Theory)
PDF
Lecture 12: React-Native Firebase Authentication
PDF
Thai Word Embedding with Tensorflow
PDF
Lecture 3 - ES6 Script Advanced for React-Native
PDF
สร้างซอฟต์แวร์อย่างไรให้โดนใจผู้คน (How to make software that people love)
PDF
Startup Pitching and Mobile App Startup
PDF
React Native Firebase Realtime Database + Authentication
PDF
React Native Firebase
PDF
React-Native Lecture 11: In App Storage
PDF
[React-Native Tutorial 10] Camera Roll / Gallery / Camera / Native Modules by...
Thai E-Voting System
Thai National ID Card OCR
Chochae Robot - Thai voice communication extension pack for Service Robot
ศักยภาพของ AI สู่โอกาสใหม่แห่งการแข่งขันและความสำเร็จ (Thai AI updates in yea...
Thai Text processing by Transfer Learning using Transformer (Bert)
How Emoticon Affects Chatbot Users
หัวใจของปัญญาประดิษฐ์ (Gradient Descent ทำงานอย่างไร)
Check Raka Chatbot Pitching Presentation
[Lecture 3] AI and Deep Learning: Logistic Regression (Coding)
[Lecture 4] AI and Deep Learning: Neural Network (Theory)
[Lecture 2] AI and Deep Learning: Logistic Regression (Theory)
Lecture 12: React-Native Firebase Authentication
Thai Word Embedding with Tensorflow
Lecture 3 - ES6 Script Advanced for React-Native
สร้างซอฟต์แวร์อย่างไรให้โดนใจผู้คน (How to make software that people love)
Startup Pitching and Mobile App Startup
React Native Firebase Realtime Database + Authentication
React Native Firebase
React-Native Lecture 11: In App Storage
[React-Native Tutorial 10] Camera Roll / Gallery / Camera / Native Modules by...

Recently uploaded (20)

PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Encapsulation theory and applications.pdf
PDF
KodekX | Application Modernization Development
PPT
Teaching material agriculture food technology
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPTX
Cloud computing and distributed systems.
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
Approach and Philosophy of On baking technology
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
A Presentation on Artificial Intelligence
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Encapsulation theory and applications.pdf
KodekX | Application Modernization Development
Teaching material agriculture food technology
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Per capita expenditure prediction using model stacking based on satellite ima...
“AI and Expert System Decision Support & Business Intelligence Systems”
Diabetes mellitus diagnosis method based random forest with bat algorithm
Chapter 3 Spatial Domain Image Processing.pdf
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Digital-Transformation-Roadmap-for-Companies.pptx
Cloud computing and distributed systems.
Encapsulation_ Review paper, used for researhc scholars
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Spectral efficient network and resource selection model in 5G networks
The Rise and Fall of 3GPP – Time for a Sabbatical?
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
Approach and Philosophy of On baking technology
Network Security Unit 5.pdf for BCA BBA.
A Presentation on Artificial Intelligence

ITS488 Lecture 6: Music and Sound Effect & GVR Try out.

  • 1. Lecture 6: Music and Sound Effect & GVR Try out. Dr. Kobkrit Viriyayudhakorn iApp Technology Limited kobkrit@iapp.co.th ITS488 (Digital Content Creation with Unity - Game and VR Programming)
  • 4. Getting Resource from Unity Asset Store
  • 5. Audio Kit Download Audio Kit at 
 http://bit.ly/2iVDB7v
  • 6. Import Audio Kit 1. Menu Bar > Assets > Import Package > Custom Package... 2. Select the "AudioKit.unitypackage" 3. Make sure that all files 
 are selected, and then
 Press "Import"
  • 8. Adding Music to the Game 1. Select "Scene 1". Right click at
 Hierarchy > Audio > Audio Source 2. Drag the "music...come..."
 to the Audio Source
  • 9. Configure the Music 1. Select Audio Source 2. Checked at • Play On Awake • Loop 3. Run "Play" to Test.
  • 10. Exercise 1: Add a sound to Game Over. • Find the sound that seems most appropriate to you. • Should it be looping or not? • Add the audio source to the Game Over scene.
  • 11. Adding Sound Effect to Ball 1. Open the Scene 2 > ShootHoopKit > 
 Drag the ball to the Hierarchy windows 2. Select the ball at the right inspector windows >
 Add Component > Audio Source 3. The attached audio source
 is added into the Ball Game object
  • 12. Trigger Sound Effect by Code 1. Drag a drop Sound file. the impact_deep_thud_bounce sound file into the AudioClip 2. Add the new C# script, "BallBounceSound.cs"
  • 13. BallBounceSound.cs 2. Drag the BallBounceSound.cs to attached 
 with the ball game object. >> 1. Writing the above code. Trigger Sound Effect by Code
  • 14. Make the customized ball as the prefab 1. Press "Play" now, We will heard 
 only the single drop of sounds.
 Even you firing multiple ball. 2. Drag the customized ball as 
 the ball prefab. 3. Press Play again.
 Now you will heard multiple
 drop sounds.
  • 15. Exercise 2: Adding a scoring sound. • Add an audio source component. • Find a good scoring sound. • Trigger in the appropriate place.
  • 16. Solution for Exercise 2 • Enter the ScoreCount.cs, Add the AudioSource part at IncreaseScore Function.
  • 17. 1. Select "ScoreCount" Game Object,
 At the inspector windows, Add "Audio source". 2. Drag and drop "Chime_ball_02" at the AudioClip part.
 Unchecked "Play On Awake checkbox.
  • 20. Make our life easier with Google VR SDK
  • 22. Google VR Installation • https://developers.google.com/vr/unity/download
  • 23. Making a new project
  • 24. Import GVR unity package 1. Assets > Import Package > Custom Package.... 2. Select GoogleVRForUnity_1.110.0.unitypackage 3. Make sure that all items are checked
 and then "Import"
  • 26. Play around with GVR Demo 1. File > Build Settings... 1. Tap "Add Open Scenes" 2. Select iOS 3. Click "Switch Platform"
  • 27. Change to Virtual Reality Project 1. Click on "Player Settings" 2. At the XR Settings,
 Select "Virtual Reality Supported" and Add "Cardboard" to Virtual Reality SDK
  • 28. Test on iOS 1. Connect with iOS phone to the machine.
 2. Press "Build and Run"
  • 29. Fast VR project using GVR 1. Create a New Empty Scene 2. Add Cube into the Scene,
 Make it in front of the Camera 3. Play
 You can not move any view.
  • 30. 1. Go to Google VR Assets > Prefabs Using GVR Prefab 2. Import the prefab like this...
  • 31. Now you can move in VR • Shift + Move Mouse = Change Orientation • Shift + Left Mouse Button = ClickButton • Shift + Right Mouse Button = AppButton • Shift + Middle Mouse Button = HomeButton/Recenter • Shift + Ctrl = IsTouching • Shift + Ctrl + Move Mouse = Change TouchPos
  • 32. There is much more in Google VR • A simple reticle prefab and associated scripts for gaze-based user interaction. • User head tracking. • Side-by-side stereo rendering. • Detecting user interaction with the system (via trigger or controller). • Automatic stereo configuration for a specific VR viewer. • Distortion correction for a VR viewer's lenses. • An alignment marker to help center the screen under the lenses when you insert your phone into a viewer. • Automatic gyro drift correction.
  • 33. Q/A