void OnEnable()
        {
            hideFlags = HideFlags.HideAndDontSave;

            manager = (LanguageManager)AssetDatabase.LoadAssetAtPath(path, typeof(LanguageManager));
            if (manager == null)
            {
                Debug.LogWarning("File not found. Creating new Language Manager...");
                manager = CreateResourceAssets.CreateLanguageManager();
            }
        }
        public static void CreateLanguageManager()
        {
            LanguageManager manager = (LanguageManager)AssetDatabase.LoadAssetAtPath(path + "LanguageManager.asset", typeof(LanguageManager));

            if (manager == null)
            {
                manager = CreateResourceAssets.CreateLanguageManager();
            }
            else
            {
                Debug.LogWarning("LocalisationManager.asset already exists");
            }
        }
Beispiel #3
0
        void OnEnable()
        {
            hideFlags = HideFlags.HideAndDontSave;

            langManager = (LanguageManager)AssetDatabase.LoadAssetAtPath(path + "LanguageManager.asset", typeof(LanguageManager));
            if (langManager == null)
            {
                Debug.LogWarning("File not found. Creating new Language Manager...");
                langManager = CreateResourceAssets.CreateLanguageManager();
            }

            locManager = (LocalisationManager)AssetDatabase.LoadAssetAtPath(path + "LocalisationManager.asset", typeof(LocalisationManager));
            if (locManager == null)
            {
                Debug.LogWarning("File not found. Creating new Localisation Manager...");
                locManager = CreateResourceAssets.CreateLocalisationManager();
            }

            index = 0;
            key   = string.Empty;
        }