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 /
  • Help Room /
This question was closed Dec 14, 2015 at 09:32 PM by Le-Pampelmuse for the following reason:

The question is answered. OP unresponsive.

avatar image
0
Question by dijital · Oct 20, 2015 at 12:48 PM · unity 52daudiounity5

Force 2d audio in script (Unity 5)

Hi

I just upgraded from unity 4 to unity 5 and now all my 2D audio is 3D.

Is there a way to force that audio to 2D in the script?

Currently I use:

Instance.Play( clip );

But this plays the clip in 3D in Unity 5.

I know about the spacial blend setting, how to I set this in the c# script?

Thanks,

Comment
Add comment · Show 5
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 dijital · Oct 20, 2015 at 01:13 PM 0
Share

$$anonymous$$y audio sources are set dynamically at runtime, so I will have no idea which audio source will be 2D or 3D, so changing the spacial blend setting on the audio source will cause more problems. I need to set the spacial blend setting at the time the clip is played.

avatar image markashburner · Nov 26, 2015 at 07:29 AM -1
Share

How the hell do you do it in script? I am having the same issue, why is no one able to answer this?

avatar image Le-Pampelmuse markashburner · Nov 26, 2015 at 10:44 AM 1
Share

I've converted your answer to a comment.

If you have a solution, post an answer. In any other case, post a comment.

avatar image Le-Pampelmuse · Nov 26, 2015 at 10:42 AM 1
Share

You can use google in most cases. :)

http://docs.unity3d.com/ScriptReference/AudioSource-spatialBlend.html

avatar image SumFortyOne Le-Pampelmuse · Dec 14, 2015 at 09:48 PM 0
Share

Lol, some people are lazy for google xD

1 Reply

  • Sort: 
avatar image
0

Answer by MadDevil · Oct 20, 2015 at 12:50 PM

@dijital

in audio source there is a slider called spatial blend.

here 0 = 2D sound and 1= 3D sound.

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 dijital · Oct 20, 2015 at 12:59 PM 0
Share

Thanks but, my question was on how you set the spatial blend in a script.

Thanks.

Follow this Question

Answers Answers and Comments

53 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

How do I turn off the previous object? 1 Answer

Why do prefabs overlap each other? 0 Answers

Footstep sound does not finish playing, it keeps restarting on movement 0 Answers

How do I rotate the player to the facing direction as in here? The camera follows it so I want to move it to facing direction. 1 Answer

Raycast2d detects hit when theres not 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