Home Why does my background music stop when the player object gets destroyed?
Reply: 0

Why does my background music stop when the player object gets destroyed?

user679
1#
user679 Published in July 23, 2018, 1:21 pm

I work with Unity 5.5.4 and I'm still learning.

My problem is when the player(object) gets destroyed(destroy(gameobject)), my backgroud music stops playing, even if I place my music in Arenamanager(gameobject), not in player(gameobject).

I don't have a function like audio.stop or something like that in my script and I already untagged the player(gameobject) and I still can't solve it.

Here is my death function:

Void Death() { 
    Instantiate(explosion, transform.position, transform.rotation);
    Destroy(this.gameobject);
}
You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.397273 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO