コード例 #1
0
        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();
            }
        }
コード例 #2
0
        public static void CreateLocalisationManager()
        {
            LocalisationManager manager = (LocalisationManager)AssetDatabase.LoadAssetAtPath(path + "LocalisationManager.asset", typeof(LocalisationManager));

            if (manager == null)
            {
                manager = CreateResourceAssets.CreateLocalisationManager();
            }
            else
            {
                Debug.LogWarning("LocalisationManager.asset already exists");
            }
        }
コード例 #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;
        }