Example #1
0
        private static void ShowWindow()
        {
            string folderPath = "Assets/Resources/Config/";

            FileHelper.CreateDirctory(PathHelper.AssetsPath2ABSPath(folderPath));
            string dataPath = folderPath + "I18NConfig.asset";

            config = AssetDatabase.LoadAssetAtPath <I18NConfig>(dataPath);
            if (config == null)
            {
                config = ScriptableObject.CreateInstance <I18NConfig>();
                AssetDatabase.CreateAsset(config, dataPath);
            }

            m_Window = GetWindow <I18nEditor>();
            m_Window.Show();
        }
Example #2
0
        private void Save()
        {
            I18NConfig config     = null;
            string     folderPath = "Assets/Resources/Config/";

            FileHelper.CreateDirctory(PathHelper.AssetsPath2ABSPath(folderPath));
            string dataPath = folderPath + "I18NConfig.asset";

            config = AssetDatabase.LoadAssetAtPath <I18NConfig>(dataPath);
            if (config == null)
            {
                config = ScriptableObject.CreateInstance <I18NConfig>();
                AssetDatabase.CreateAsset(config, dataPath);
            }

            config.SetAreaInfo(new[] { "CN", "JP" });
            config.SetKey(new[] { "name", "value" });
            EditorUtility.SetDirty(config);
            AssetDatabase.SaveAssets();
        }
Example #3
0
 public override void OnOpen(I18NConfig config)
 {
     base.OnOpen(config);
     Log.e("I18nTextTab open");
 }
Example #4
0
 public virtual void OnOpen(I18NConfig config)
 {
     this.config = config;
 }