Game Development Reference
In-Depth Information
waveform), you can toggle looping On or Of , and you can turn auto
previewing On or Of . With this setting Unity will automatically play
every AudioClip that's selected in the Project View. Notice you can't edit
anything either—it's strictly bare bones here. Nonetheless it's dei nitely
useful if you want to know if your sound loops properly in the game.
Pro Tip
While editing audio i les
destructively within Unity isn't
possible, you can right click on
any AudioClip in the Project
and select Show In Finder .
From here, you can open your
audio i le in the editor of your
choice and save the changes.
If you're planning on making a
copy of any audio i le and you
want it recognized in Unity, it's
dei nitely advised to save your
copy outside of the Unity Asset
folder and then bring it in via
the drag-and-drop method.
Putting a Sound into Gamespace
Selecting Objects to Add Audio Sources to
We already have an Audio Listener in the Scene (it's usually found as an
included Component attached on the Main Camera Object . In this case
it's attached to the object named Player ). Now we need to add an Audio
Source to complete the picture.
Select the PlasmaField object from the Hierarchy , or the Scene View
(it's the large transparent colorful cylinder object), and press F with your
cursor in the View. You should now be focused on the object.
We're going to add an Audio Source to this object so to do that we'll go
to the Components menu and select Audio , and then Audio Source .
Let's go over the basic controls:
Audio Source Component Settings
The name of the Audio Source Component is at the top. Clicking on the
name will minimize that part of the view. There's a check mark before
the name. Use this check mark to deactivate or activate the Component.
Activating and deactivating Components can be useful in troubleshooting.
 
Search WWH ::




Custom Search