Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We’re making changes to the Unity Runtime Fee pricing policy that we announced on September 12th. Access our latest thread for more information!
    Dismiss Notice
  3. Dismiss Notice

Resolved Why doesn't LocalizeAudioClipEvent have SetTable/SetEntry , like LocalizeStringEvent does?

Discussion in 'Localization Tools' started by Rejutka, Apr 12, 2023.

  1. Rejutka

    Rejutka

    Joined:
    Feb 19, 2017
    Posts:
    15
    (Unity 2021, Localization 1.3.2)

    With LocalizeStringEvent , I can switch the entry by script, but apparently it's not possible with LocalizeAudioClipEvent ?
    I've found examples that directly change the audio clip, which I don't see the use of, because I could just change the audioclip at the source?

    What I want to do is have several texts in several languages, and control via script which one is shown (that works, so far).
    Now I also want to have audio played (i.e. the text spoken), but that doesn't seem to work. I've an audio source in the gameobject and a localize audio clip event that should supply the audio clip according to locale.

    Obviously I'm missing something - is there a good tutorial that explains how audio works in localization? It seems it's quite different from text (or fonts).
     
  2. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    7,721
    Rejutka likes this.
  3. Rejutka

    Rejutka

    Joined:
    Feb 19, 2017
    Posts:
    15
    It works now, thanks.

    I didn't understand the assetreference at first, as I didn't use stringreference either. LocalizeStringEvent has methods specifically to set table and entry separately, I was looking for that in assets.

    In any case, it works, so I'm happy :)
     
  4. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    7,721
    Oh yes, I forgot about them! They are just shortcuts to the StringReference.