Esempio n. 1
0
 public void Teardown()
 {
     Object.DestroyImmediate(m_Settings);
     Object.DestroyImmediate(m_SharedStringTableData);
     Object.DestroyImmediate(m_SharedAssetTableData);
     LocalizationSettingsHelper.RestoreSettings();
 }
Esempio n. 2
0
        public void Setup()
        {
            LocalizationSettingsHelper.SaveCurrentSettings();

            m_SharedStringTableData = ScriptableObject.CreateInstance <SharedTableData>();
            m_SharedStringTableData.TableCollectionName     = kStringTableCollectionName;
            m_SharedStringTableData.TableCollectionNameGuid = kStringTableNameGuid;
            m_SharedStringTableData.AddKey(kStringKeyName, kStringKeyId);

            m_SharedAssetTableData = ScriptableObject.CreateInstance <SharedTableData>();
            m_SharedAssetTableData.TableCollectionName     = kAssetTableCollectionName;
            m_SharedAssetTableData.TableCollectionNameGuid = kAssetTableNameGuid;

            m_Settings = LocalizationSettingsHelper.CreateEmpty();
            var stringDb = new LocalizedStringDatabase();

            m_Settings.SetStringDatabase(stringDb);
            var assetDb = new LocalizedAssetDatabase();

            m_Settings.SetAssetDatabase(assetDb);

            var rm = new ResourceManager();

            stringDb.SharedTableDataOperations[kStringTableNameGuid] = rm.CreateCompletedOperation(m_SharedStringTableData, null);
            assetDb.SharedTableDataOperations[kAssetTableNameGuid]   = rm.CreateCompletedOperation(m_SharedAssetTableData, null);

            LocalizationSettings.Instance = m_Settings;
        }
        public void CreateTestLocalizationSettings()
        {
            m_Settings = LocalizationSettingsHelper.CreateEmpty();
            var localeProvider = m_Settings.GetAvailableLocales();

            localeProvider.AddLocale(Locale.CreateLocale(SystemLanguage.Arabic));
            localeProvider.AddLocale(Locale.CreateLocale(SystemLanguage.English));
            localeProvider.AddLocale(Locale.CreateLocale(SystemLanguage.French));
            localeProvider.AddLocale(Locale.CreateLocale(SystemLanguage.German));
            localeProvider.AddLocale(Locale.CreateLocale(SystemLanguage.Japanese));
        }
 public void Teardown()
 {
     LocalizationSettingsHelper.RestoreSettings();
 }
 public void Setup()
 {
     LocalizationSettingsHelper.SaveCurrentSettings();
 }