Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by bywewe · Sep 04, 2011 at 06:48 AM · audioimport

how do i make audio clips for unity 3d?

i'm making thinking of making a single player mmofps gam.i wanna know how can i make audio clips? so i can import script them. i know about the sound recorder and on a side note, does audio clips from sound recorder work in unity?

Comment
Add comment · Show 1
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Waz · Sep 04, 2011 at 11:27 AM 0
Share

A single-player massively multiplayer online first person shooter gam(e)? Someone already thought of thinking of making that - John Carmack in 1992.

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by devilkkw · Sep 04, 2011 at 09:54 AM

On unity some audio format works(wav,mp3,ogg). I don't understand what script are u speaking,for play audio just use correct function.See thath on the default documentation.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by aldonaletto · Sep 04, 2011 at 11:35 AM

PC Sound Recorder saves the sounds by default in WAV, and Unity can read most audio formats, including mp3, wav, aif (Mac standard). But the Windows Sound Recorder isn't a good software - use GoldWave, from www.goldwave.com; it's easy to use, has a fully functional demo version and several resources to record, edit, apply effects and save. Once you have the sound ready, import it to Unity via menu Assets/Import New Asset....
In Unity, you can place the sounds in objects adding an AudioSource and setting its clip variable to the sound. If you want the object to emit the sound by script, use audio.Play(); if you want the same object to play different sounds in certain cases, declare one AudioClip variable for each sound, and set audio.clip with the desired one prior to Play; another way is to declare the variables and play the sound you want using audio.PlayOneShot(sound, volume). There go some usage examples:

var sound1: AudioClip; // set the sounds in these variables var sound2: AudioClip; var sound3: AudioClip;

function PlaySound1(){ audio.clip = sound1; // define which sound to play, if not already defined audio.Play(); }

function PlaySoundN(n: int){ switch (n){ // play one o case 1: audio.PlayOneShot(sound1, 0.5); break; // play at half volume case 2: audio.PlayOneShot(sound2, 0.7); break; case 3: audio.PlayOneShot(sound3); break; // play at max volume (default) } }

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Waz · Sep 04, 2011 at 11:47 AM 0
Share

Aldo, if you want to use pre tag, be sure to add extra blank line, otherwise UA/QATO screws it up (fixed)

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

How to loop a sound clip on a ButtonDown function 1 Answer

Play a multiple audio sources sequentially 2 Answers

How to emit a sound on specific collision. 1 Answer

How to Import .mp3 and use it as AudioClip 1 Answer

SOS. Box collider trigger for audio 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges