Help Wanted Localization Asset Audio clip doesnt work for me

Hello i’v been using Localization to locate eng/swe Textmeshpro strings over a week now and it works fine.

Somehow i cant make the “Localize Audio Clip Event” to work on any phone.
Works fine in editor though.

Here is pic of button:

Here is Pic of Localization Table:

Did you build the addressables?
What are you using to start the audio clip playing, do you use a different script to do that?
Is there any errors in the log?

1 Like

Yes i do the usual thing
6911273--810035--upload_2021-3-8_1-30-15.png
However i had an issue a few weeks ago that couldnt find any solution in webb or anyone would advise anything.

My buttons that have Audio source and that should play audio on click didnt work.

My final Solution i had to do to make it work, was putting a Bolt Visual script on Canvas :slight_smile:

https://discussions.unity.com/t/830818

Sounds like you may be calling Play too soon. Try doing it through the Audio Event.
6912050--810266--Screen Shot 2021-03-08 at 09.13.42.png

1 Like

Sir, this didnt work. This is The button*
6912185--810287--upload_2021-3-8_10-59-24.png
But i have a temporary solution through bolt.

I have two flags in main menu, for example the english flag i put a flow machine
6912185--810290--upload_2021-3-8_11-2-43.png

Under Button “9” i want sound files to change i have two Game objects with audio source
6912185--810293--upload_2021-3-8_11-3-47.png
On the Button “9”
i have these set
6912185--810296--upload_2021-3-8_11-5-17.png
It works on phone but in Logcat i get repetive yellow errors.

6912185--810287--upload_2021-3-8_10-59-24.png

6912197--810302--upload_2021-3-8_11-7-34.png

This keeps repeating one after another… but there are no known or visible issues playing.

I should mention this is something that happened automatically once i made a Localized Asset Table for these four files

6912215--810308--upload_2021-3-8_11-15-48.png
6912215--810311--upload_2021-3-8_11-16-17.png

Remember when first time i used Localization text it work in editor then it didnt work in phone, you helped me with the Build Default thingy and then it worked magically on phone.

This is almost same scenario it works in editor but not on phone, but with Bolt solution that works but still not good on the long run.

It says can not play a disabled audio source
Sounds like your Audio GameObject or parent GameObject is disabled.

That happens when i use Bolt solution with the Visual script on the Flag, And on the button i used 2 Disabled gameobject audio source as childs inactived once you click the flag Eng or Swe you get the right Game object Audio source activated.

6912290--810350--upload_2021-3-8_11-48-5.png

Are you enabling the source before calling play? Maybe leave them enabled and just call Stop/Play on them.

1 Like

Okey, this is what i finally did
6912446--810368--upload_2021-3-8_12-28-58.png

Instead of 2 Buttons 2 with two Localized Audio Clip i did 4 Buttons that Gets actived depending on wich flag you select.
6912446--810374--upload_2021-3-8_12-31-0.png

Only problem is, Users get pre-active Locale depending on their Default Language, So if they dont click the Flag they get this problem at that page

6912446--810380--upload_2021-3-8_12-34-28.png

I get 12 Buttons overlapping Reward button, when it really should be 10.
I have Locale automatically at start of app choose language to phones default language.
Do you know what i should put on Bolt Visual script so it can automically choose wich buttons objects should be active?

6912446--810383--upload_2021-3-8_12-39-35.png

Maybe this does the trick? imma try it out

You can just change the Locale Selectors to use a different startup Locale if you wish. You could just use a Specific Locale Selector so its always the same Locale.
https://docs.unity3d.com/Packages/com.unity.localization@0.10/manual/LocalizationSettings.html#locale-selector


Remove the Command Line Locale Selector and the System Locale Selector

1 Like

I like your Solution but i already Promised the little users i have on my latest update +Standard Language Detection

I did this on both flags, when doing this without the button option it doesnt change Sound files in app in the editor you could say it doesnt in-activate and activates the selected Game objects.

But with Button option included it works at its intended.
6912548--810410--upload_2021-3-8_12-59-17.png

I wish to use the Localized Audio Clip so i dont need duplicate Sound files and use flow machine on the Flag like this.

But as a temporary solution it’s good, i havent gotten to the point were I need more different types of audio.

I do wish a Video Tutorial Step-step on how to succesfully get the Localized Audio clip working.

Ty for your time Karl Jones, it is nice getting your expertize.

1 Like