예제 #1
0
    public void SetLocalization(int id)
    {
        _selectedLocalizationIndex     = id;
        PlayerPresenter.LocalizationID = id;

        OnLocalizationChanged?.Invoke();
    }
예제 #2
0
        public void SetLocalization(LocalizationData data)
        {
            if (Value.Contains(data))
            {
                Value.Remove(data);
            }

            Value.Insert(0, data);
            OnLocalizationChanged?.Invoke();
        }
예제 #3
0
        public void Reload(IAssetBundleReader assetBundleReader, E_LOCALE_TYPE locale)
        {
            if (assetBundleReader == null)
            {
                throw new ArgumentNullException("assetBundleReader");
            }

            assetBundleReader.OpenAsync((reader) =>
            {
                TextDataPackagesBundle packagesBundle = reader.LoadAsset <TextDataPackagesBundle>(mLocalizationPackageName);

                if (packagesBundle != null)
                {
                    mCurrLoadedPackage = packagesBundle.GetPackage(locale);
                    OnLocalizationChanged?.Invoke();
                }
            },
                                        (error) =>
            {
                Debug.LogError(error);
            });
        }