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

(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).

They are both quite similar.
There’s a sample in the scripting docs Class LocalizeAudioClipEvent | Localization | 1.4.5

They also have the same set table and entry API, its under AssetReference instead of StringReference.

E.G myLocalizeAudioClipEvent.AssetReference.SetReference("My Table", "My Entry");

1 Like

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 :slight_smile:

Oh yes, I forgot about them! They are just shortcuts to the StringReference.