Esempio n. 1
0
        public static void Reload()
        {
            if (!GameText.Exists)
            {
                GameText.CreateInstance();
            }

            var gameTextInfo = GameTextLanguage.GameTextInfos.ElementAtOrDefault(GameTextLanguage.Prefs.selection);

            if (gameTextInfo != null)
            {
                GameText.Instance.LoadFromResources(gameTextInfo.AssetPath);
            }

            var gameObjects = UnityEditorUtility.FindAllObjectsInHierarchy();

            foreach (var gameObject in gameObjects)
            {
                var setter = gameObject.GetComponent <GameTextSetter>();

                if (setter != null)
                {
                    setter.ImportText();
                }
            }

            IsLoaded = true;
        }