Пример #1
0
        public void CreateTestLocalizationSettings()
        {
            LocalizationSettingsHelper.SaveCurrentSettings();

            m_Settings           = ScriptableObject.CreateInstance <LocalizationSettings>();
            m_TempAssetDatabase  = new LocalizedAssetDatabase();
            m_TempStringDatabase = new LocalizedStringDatabase();

            LocalizationSettings.Instance       = m_Settings;
            LocalizationSettings.AssetDatabase  = m_TempAssetDatabase;
            LocalizationSettings.StringDatabase = m_TempStringDatabase;
        }
Пример #2
0
        public void Setup()
        {
            LocalizationSettingsHelper.SaveCurrentSettings();

            LocalizationSettings.Instance      = ScriptableObject.CreateInstance <LocalizationSettings>();
            m_FixtureAssetDatabase             = new FixtureAssetDatabase();
            LocalizationSettings.AssetDatabase = m_FixtureAssetDatabase;

            m_GameObject           = new GameObject(nameof(ChangingLocalizedAssetEventUpdatesValues));
            m_LocalizeTextureEvent = m_GameObject.AddComponent <LocalizeTextureEvent>();

            // Setup with a default value so we do not start with an empty StringReference.
            m_LocalizeTextureEvent.AssetReference.SetReference(kDefaultTableCollectionName, kDefaultEntryName);
            ClearLastGetTableEntryValues();
        }
Пример #3
0
        public void Setup()
        {
            LocalizationSettingsHelper.SaveCurrentSettings();

            LocalizationSettings.Instance = ScriptableObject.CreateInstance <LocalizationSettings>();

            var localeProvider = new TestLocaleProvider();

            m_Selected = Locale.CreateLocale("en");
            localeProvider.AddLocale(m_Selected);
            LocalizationSettings.Instance.SetAvailableLocales(localeProvider);

            m_FixtureStringDatabase             = new FixtureStringDatabase();
            LocalizationSettings.StringDatabase = m_FixtureStringDatabase;

            m_FixtureStringDatabase.NoTranslationFoundMessage = "No translation found for '{key}'";
            m_GameObject          = new GameObject(nameof(ChangingLocalizedStringUpdatesValues));
            m_LocalizeStringEvent = m_GameObject.AddComponent <LocalizeStringEvent>();

            // Setup with a default value so we do not start with an empty StringReference.
            m_LocalizeStringEvent.StringReference.SetReference(kDefaultTableCollectionName, kDefaultEntryName);
            ClearLastGetTableEntryValues();
        }