Hi
I want to feed a list of localized asset (audioclip), into an different array. But it dosent seem to wants to get fed into the new array named TTSLocal[ ].
If i debug the Result i see that it has the right KeyID and is the type of AudioClip. With no errors im stumped on what is going wrong.
public LocalizedAudioClip[] localAudioMessages;
public AudioClip[] TTSLocal;
private void Start()
{
TTSLocal = new AudioClip[localAudioMessages.Length];
}
public void GetAudioMessages()
{
for (int i = 0; i < localAudioMessages.Length; i++)
{
StartCoroutine(GetAudioMessage(i));
}
}
public IEnumerator GetAudioMessage(int i)
{
var localeAudioMessage = LocalizationSettings.AssetDatabase.GetLocalizedAssetAsync<AudioClip>(TableName, localAudioMessages[i].TableEntryReference.KeyId);
while (!localeAudioMessage.IsDone)
{
yield return null;
}
TTSLocal[i] = localeAudioMessage.Result;
We got the same functionality for localizedStrings working.
public LocalizedString[] localizedMessages;
public string[] messages;
private void Start()
{
messages = new string[localizedMessages.Length];
}
public void GetTextMessages()
{
for (int i = 0; i < localizedMessages.Length; i++)
{
StartCoroutine(GetTextMessage(i));
}
}
var localeMessage = LocalizationSettings.StringDatabase.GetLocalizedStringAsync(StringTableName, localizedMessages[i].TableEntryReference.KeyId);
while (!localeMessage.IsDone)
{
yield return null;
}
messages[i] = localeMessage.Result;

