Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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
1
Question by Brenden-Frank · Oct 07, 2012 at 04:00 AM · audioaudiosourceitweenvolumecrossfade

Can 2 iTween components run on the same gameobject simultaneously?

I have 2 audio sources on the same object. One which I would tween volume from 0 to 1 represented by:

 iTween.AudioTo(channelTarget.gameObject, iTween.Hash("name", "fadein", "audiosource", newChannel.audioSource, "volume", busVolume, "time", 8F)

And the other audio source which would tween volume from 1 to 0 represented by:

 iTween.AudioTo(channelTarget.gameObject, iTween.Hash("name", "fadeout", "audiosource", Channel.audioSource, "volume", 0F, "time", 8F));

Both iTween components attach to the game object but the first one gets inturrupted and disposed by the second.

Has anyone encountered something like this?

Comment
Add comment
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

2 Replies

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by justinl · Oct 13, 2012 at 02:08 PM

I've had the same problem as you Brenden. My solution was to create 2 individual GameObjects that are parented to your parent object. Then each of those game objects has it's own AudioSource. Works perfectly for cross fading.

Comment
Add comment · Show 2 · 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 Brenden-Frank · Oct 13, 2012 at 07:27 PM 0
Share

Unfortunately this is a small element of a much larger audio engine I'm writing. I can't afford the luxury of having multiple game objects because the user defines which game object these sounds are attached to in the event.

I was forced to manually tween the crossfade over an update function ins$$anonymous$$d.

Thank you for your response!

avatar image justinl · Oct 13, 2012 at 07:44 PM 0
Share

Ah! You're welcome. At least you've figured out your own way as well that fits your project. Cheers

avatar image
0

Answer by Kirbyrawr · Oct 07, 2012 at 10:32 PM

I recommend you to use Visual Itween Editor from assets store , it's free and it allow to do the thing you want. Cheers ^^

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

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

11 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

Related Questions

How to avoid audio glitches whilst switching volume of an Audiosource each Update()-Frame? 0 Answers

AudioSource.ignoreListenerVolume warning 1 Answer

How to get current volume of an AudioSource. 3 Answers

What is the exact equation being used for sound volume? 0 Answers

Breathing volume increases as player gets more tired 0 Answers


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