void CreateDatabase()
 {
     languageDatabase = ScriptableObject.CreateInstance <LanguageDatabase>();
     AssetDatabase.CreateAsset(languageDatabase, DATABASE_PATH);
     AssetDatabase.SaveAssets();
     AssetDatabase.Refresh();
 }
        void LoadDatabase()
        {
            languageDatabase = (LanguageDatabase)AssetDatabase.LoadAssetAtPath(DATABASE_PATH, typeof(LanguageDatabase));

            if (languageDatabase == null)
            {
                CreateDatabase();
            }
        }
Пример #3
0
        void Start()
        {
            #if UNITY_EDITOR
            db = (LanguageDatabase)AssetDatabase.LoadAssetAtPath(DATABASE_PATH, typeof(LanguageDatabase));

            db.Translate(() =>
            {
                _controller.ProgressComplete();
            });
            #endif
        }