Forum rules - please read before posting.

Endless Loop on Action Dialog:Speech / Addressable when play mode script "use existing build" is us

Hi all,

I have a strange issue for only a few of my speech files with addressable.
They all play fine with play mode script: "Use asset database". But for the release I need to switch to "use existing build" as far as I leaned.

If I switch to "use existing build" play mode script I have an NPC who get's stuck in an endless loop in the action "Dialog->Speech". The script is looping Run() method waiting for "isAwaitingAddressableAudio" turning to false again. But OnCompleteLoadAudio() is never called so speech line is never played.
Another NPC in this scene is playing his lines correctly.
No warnings or errors in the console. Game is just stuck waiting on the NPC to say his line, but this never happens.

Tried with Unity: 2021.3.21f1 and 2020.3.14.f1
AC v: 1.75.4
Adressables: tried 1.17.xx, 1.18.xx, 1.19.xx

Any ideas why this is not returning and Event "OnCompleteLoadAudio()" is never fired in this play mode script?

Best
Kai

Comments

  • I found the reason. It happend because I preloaded another scene in this action list. The calls to Dialog->Speech after the preload ended in the endless loop when I used "use existing build" as play mode script. Once I removed the preload everything worked fine.

  • It's hard to say if this is a Unity or an AC issue. Is the speech multi-line, and are you testing both with and without the ActionSpeech test script I sent you?

    I'll attempt a recreation, but know that it's also possible to load scenes via addressable - which should give better results than preloading.

  • edited November 2022

    It's single line speech. And it's with and without the testscript for multiline fix. (Which works fine btw.)

    Yes, I played around with Load Scenes by addressables. But it lead to issues, I guess until the huge bundle file is loaded in background, I had very long delays in scene changes. I still want to try if it works better if each scene gets an own addressable Group. I have just added the Scenes to the Local Group where all the speech mp3s are. Maybe this is not a good approach.

  • Moving your various Addressables to different groups based on how they're used will improve performance, but AC won't interfere with when the groups themselves are loaded and unloaded - that'll have to be handled separately.

    I can't recreate the issue, however. Is this a speech line within a scene file?

    To be clear: speech no longer plays if you've previously run a Scene: Switch Action with Don't change scene, just preload data? checked? Is this the case if you run these two Actions separately (i.e. two separate Cutscenes, manually run one after the other), or do they both need to be run together for the issue to occur?

  • This happend in a OnStart cut scene. Exactly, Speech no longer plays if you've previously run a Scene: Switch Action with Don't change scene, just preload data checked.
    The next Dialog:Speech went into this endless loop waiting on the OnCompleteLoadAudio().
    All Dialog:Speech before the Preload call are working fine.
    It tried to separate the Action Lists to run in parallel, call the Dialog:Speech in a separate Actionlist, etc. but always the same results. Once the preloading has started the Speech hangs.

    Best
    Kai

  • Thanks for the details - though it matches up with what I'd previously tried to recreate the issue.

    Don't preload scenes for now. I can't see why the two systems would be linked, but it may be a Unity issue rather than an AC one.

    If you can create a cut-down project that demonstrates the issue, you're welcome to PM it to me to take a look at.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.