Hello! I am facing a performance issue in my project using localization…
I have created this function to obtain the text async from a localizedString, however I find that when I run it my game suffers a performance spike especially on the first execution and I don’t understand why…
public async Task<string> GetText()
{
AsyncOperationHandle<string> operationAsync = localizedString.GetLocalizedStringAsync();
Addressables.ResourceManager.Acquire(operationAsync);
await operationAsync.Task;
if (operationAsync.IsDone)
{
if (operationAsync.Result.Length == 0)
{
Dev.LogWarning("No text found for localizedString. Table: " + localizedString.TableReference.TableCollectionName + " key: " + localizedString.TableEntryReference.Key);
}
}
else
{
Debug.LogError("Cannot get localized string");
}
return operationAsync.Result;
}
Am I missing some localization? I have tried preloading the different tables but I hardly notice any differences… Any thoughts on this?
That is in the editor but in my android compilation the peaks reach up to 2000ms!! ![]()
