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
1
Question by Chris100100 · Jan 25, 2017 at 10:59 PM · bugmusicplaymodestopped

In-game music plays when editor stopped, does not play in 'play mode'

Exactly what the title says. When I play my game in the unity engine, the music that is supposed to be playing in-game doesn't work, but the sound effects do. When I stop the play mode the music just plays unexpectedly. I've restarted unity several times but the issue is still present. Also this literally just started happening right now.

What should I do?

Comment
Add comment · Show 6
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 Chris100100 · Jan 26, 2017 at 03:28 PM 0
Share

No suggestions at all? If needed I can provide a video demonstrating the issue

avatar image FortisVenaliter Chris100100 · Jan 26, 2017 at 06:21 PM 0
Share

Please do. $$anonymous$$ake sure you include a view of your AudioSource setup and any pertinent code when you do.

avatar image Chris100100 FortisVenaliter · Jan 27, 2017 at 03:09 AM 0
Share

No changes were done since it started happening the problem literally came up out of nowhere after making a quick build.

Here's the video

avatar image wachief · Jan 27, 2017 at 01:56 PM 0
Share

I know it sound silly but the first thing i do when unity is acting out is to restart it. So if you didn't do it already, restart unity and see if its still happening.

avatar image Chris100100 wachief · Jan 28, 2017 at 05:25 PM 0
Share

Yeah, that was the first thing I did, I even tried restarting my computer and opening with a completely different version of Unity and it still does it, but only for me.

avatar image Chris100100 · Jan 28, 2017 at 05:26 PM 0
Share

I use the unity collab editor for another project and the same problems happens, but only on my end. The other person does not experience this problem. Also when I make a build, everything works as it should.

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Konsicrafter · Jan 28, 2017 at 06:57 PM

Could you maybe post (or show in a video) your methods where the music is played? Maybe add some Debug.Log() calls before the play starts. Is the AudioSource-setting "PlayOnAwake" active? You could try to call the Play() method in the AudioSource instead by implementing it in any script in the start method. You could also try to build the project again. - Does the music play normally in the build? - Does the music start when you close the build?

My last idea would be to clear the unity cache and to change the platform to android or so, then switch it back to reload some settings.

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 Chris100100 · Jan 29, 2017 at 02:01 AM 1
Share

The builds have no problems and everything works as intended, it's only in the editor that there is a problem. Changing the platform didn't change the editor results unfortunately, but I'm not sure how to clear the Unity cache, how would I do that?

I posted a video demonstrating the problem, but here it isin case you didn't see it. The music is PlayOnAwake active and doesn't have any scripts calling to start or stop it. Telling it to start in a script would probably work, but doing this for each scene would be a lot of work and would simply be a workaround.

avatar image Konsicrafter Chris100100 · Jan 29, 2017 at 08:16 AM 0
Share

To clear the unity GI cache, navigate to Edit->Preferences->GI Cache->Clear cache.

Please try to create a script and play the music in the start method and disable "PlayOnAwake". So we can find out, where the error is. You only have to make this in one scene, we can then proceed with analyzing the problem.

What unity versions are you using? I experienced some issues with the current beta version

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

66 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 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

Problem with Unity 5.5.0f3 . Need help 0 Answers

I'm getting a SIGILL error with Unity 2018.2.5 - 6f1. Why is that? 1 Answer

Unity gets stuck on Application.Reload when entering play mode 4 Answers

Animation plays in editor but not in playmode 1 Answer

Editor Camera moving while rotating 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