Search Unity

Timeline + Localization

Discussion in 'Timeline' started by stelabouras, Aug 7, 2022.

  1. stelabouras

    stelabouras

    Joined:
    Jan 20, 2013
    Posts:
    3
    I am using Timeline to organize the cutscenes of my game (the cutscenes drive the internal monologue of the player character, voice over, audio effects etc) and I have a general question on what is considered to be the best practice when it comes to timeline and localization (I am using Unity's Localization package).

    The way I see it I have to choose between two approaches:

    1) Localize the timeline assets

    If I localize the timeline assets, I will have a separate timeline asset for each cutscene / language combo. This will allow me to work with a specific language per timeline asset and I will be able to preview them without having to worry about the text or audio being shorter or longer depending on the language, which affects the timeline duration (e.g. the same phrase in English vs Japanese vs Russian can have a different length both in text and as a voice over, so they shouldn't have the same duration in the timeline).

    The downside of this approach is that I will end up with a large number of timeline assets (number of cutscenes * number of supported languages), plus there is a technical issue when using a localized timeline asset (as an Addressable), where the timeline signals do not seem to be working properly (ref).

    2) Use localized clips (for text, audio etc) on the same timeline

    If I use localized text (e.g. via `LocalizedString`) and localized audio clips then I can have one timeline asset per cutscene. The downside here is that I will have to adjust all localized clips on those timeline assets, so that I will always pick the one with the longest duration for all of the languages (e.g. for a certain text clip, if the text in Russian is the longest, this will have to be used as the duration for that clip all of the languages), which will impact the experience for the user.

    3) ???

    Maybe there's another approach here I am not considering, feel free to let me know if you have a better approach on this issue.

    Let me know if you have any questions regarding the issue, English is not my native language so maybe I am not describing the problem in the best way possible.

    Thank you for your time!
     
  2. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,295
    At the moment approach 1 is probably the safest in order to keep things in sync.

    3) It may be possible to create a custom timeline asset that will set its length based on the current audio clip, although it may still be difficult to get it to sync up with other parts of the timeline. This is something we want to look further into in the future.
     
  3. stelabouras

    stelabouras

    Joined:
    Jan 20, 2013
    Posts:
    3
    Thank you for your response Karl!

    The proposed third approach sounds a bit more involved at the moment, so I will probably go with the first one although it is kind of unfortunate that timeline signals do not seem to work correctly when timeline assets are turned into Addressables.

    In any case, thanks again!
     
    karl_jones likes this.
  4. horatiu665

    horatiu665

    Joined:
    Nov 22, 2012
    Posts:
    24
    Hi! On this topic, I am doing the same thing and having problems swapping timelines.

    My setup is to have a PlayableDirector in the scene, with a ref to a TimelineAsset (English). I am able to do separate builds per language so I don't have to hotswap, but I do want to do it from a script - I just want to change TimelineAsset to a Japanese version on the same PlayableDirector. But the problem is my TimelineAsset has like 15 bindings, so it would be nice to not have to set them by hand - how do you deal with setting the bindings after swapping timelines? Do you just do it by hand or did you figure out how to transfer automatically?
     
  5. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,295
    Can you share the project or an example? Id need to see something to really understand the issue.
     
    BlackSpider likes this.
  6. horatiu665

    horatiu665

    Joined:
    Nov 22, 2012
    Posts:
    24
    Here is a screenshot of the tracks in my timeline, that I must reassign to the same objects when replacing the timeline with a different language version. Try making a timeline with some references to audiosources, gameobjects etc like this, then try duplicating the asset and assigning it to the same PlayableDirector. You will find that it keeps a separate list of bindings for each timeline asset, and no way to transfer those bindings automatically. Sorry I can't share the project but this should be enough to reproduce the behaviour.
     

    Attached Files:

  7. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,295
    So when you duplicate the asset it does not fully duplicate everything? I'm not very familiar with Timeline but it sounds like a bug with the Timeline system if that is the case. I would file a bug report https://unity3d.com/unity/qa/bug-reporting
     
  8. yosefstudios

    yosefstudios

    Joined:
    May 8, 2015
    Posts:
    129
    I think my question is still on topic, so...

    I tried to take on this approach before, but I had one issue, and that was that I wanted to preview the localized result in Editor. However, it seems that this is impossible by design, since apparently the localization process is done at runtime. But maybe I missed something?
     
  9. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,295
    Localization should work in the editor for preview, you just need to make sure you have an active locale. This can be set through the localization scene control window