Forum rules - please read before posting.

Unity timeline - AC speech track not doing anything

edited March 2021 in Technical Q&A

AC Ver: 2019.4.18f1
Unity Ver: 1.73.2

Hello,

I'm trying to add an AC speech track into a Unity timeline so I can control speech. So far i'm not getting any results when playing.

I'm getting no errors or warnings in the console.

I can preview it just fine:

And the setup looks correct for targeting the player:

However when playing, the track doesn't produce any results:

Comments

  • edited March 2021

    My bad. I had the timeline set to 'play on awake', but if I trigger it with the Engine : Control Timeline it seems to be fine.

    Is that expected behaviour Chris?

    If so, adding a comment into the manual about not relying on Unity's default "play on awake" would be great.

  • edited March 2021

    Should work - the 3D Demo's Intro timeline can run on awake just fine. You should only see a difference if the Timeline Action involves any rebindings, or possibly if the clip runs on the first frame.

    Using addressables? Is your Player in the scene file or spawned in? Try forcing on subtitles - I can't tell if it's just audio not playing, or the line isn't being triggered at all.

  • edited March 2021

    Not sure what you mean by addressables mister? They aren't something I think I've touched or learnt about yet.

    The player was being spawned in (because player switching was true) but I've just disabled that and tried placing them into the scene with the same no result.

    I've no audio atm, subtitles should be forced:

  • edited March 2021

    This gets a bit stranger. After adding a timeline which plays 'on awake' it seems to work the first time I enter play mode, but not subsequent times.

    In all cases though Engine: Control Timeline makes it work fine.

  • edited March 2021

    In all cases though Engine: Control Timeline makes it work fine.

    Certainly that's the "safest" way to do it, as it ensures that it's only run once AC is initialised. Though I can't recreate the original issue, I would still recommend relying on the Action as best practice.

  • edited March 2021

    Yeah, I was thinking it was likely an initialisation problem, but that still doesn't quite explain how it seems to work at least once.

    Either way I'm more than happy to use best practice. Thanks Chris.

  • edited March 2021

    Sorry @ChrisIceBox I couldn't let it go, and I've managed to recreate the issue in a new project. I've narrowed it down to the option 'For speakers of type' in the subtitle menu.

    See, in my project I want to ensure the subtitles that appear on the UI are only used by the player's speech, not other NPC's, so I went ahead and made the subtitle menu specific for the player.

    In both cases the timelines below are running from On Awake with speech tracks for the player.

    When set to all speakers everything is good:

    But when set to a specific speaker (player):

    The 2nd timeline will work properly if triggered through Engine: Control Timeline

    I'll be using the best practice anyway as we discussed, but I can send you the project if you think there's anything there you'd like to tinker with.

  • Recreated. Different issue, but the same underlying cause.

    The problem is that the Timeline initialises when it plays - and if its doing so via "Play On Awake", then it's doing so before the Player is present. This means that the Player is not assigned to the track when the clip plays.

    I should be able to address this - thanks for sticking with it.

  • No problem at all!

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.