Announcement

Collapse
No announcement yet.

Audio Between Levels: Possible on Game Instance?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • started a topic Audio Between Levels: Possible on Game Instance?

    Audio Between Levels: Possible on Game Instance?

    Hello,

    Preface - I have used Unreal in the past, but I am extremely rusty as several new projects I am working on use it.

    I am currently implementing some audio for a game, and I am wondering what the best method to implement music between maps. In the past, it was suggested that I use a persistent level and level streaming to accomplish this; however, the current projects are not set up in this manner, and I fear the amount of work involved to convert them to the streamed levels.

    I had an idea about calling the audio from the GameInstance, as I believe this persists between levels. Has anyone gotten a system like this to work?

  • replied
    Got it. Thanks a lot!

    Leave a comment:


  • replied
    I will quote Dan, epic audio god:
    "You play music on an Audio Component, you pass the Audio Component Reference to something that persists between levels, like the Game Instance, the Game Instance passes the Audio Component back to the next level."

    So it's very doable in normal blueprints, either create your own gameinstance and hook it up to game, or for example cast to the pre-existing one through other BPs. Many ways to go about it.
    Last edited by ArthurBarthur; 05-13-2019, 05:57 AM.

    Leave a comment:


  • replied
    Awesome, thanks for comment!

    Would you happen to be able to point me in the direction of an efficient way to do this? I am essentially having to relearn how to work in Unreal after so long. I'm assuming there is something regarding this function in the doc?

    Leave a comment:


  • replied
    Yeah, if you pass an audio component to the Game Instance it will persist between levels.

    Leave a comment:

Working...
X