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(); }
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(); }
public override void OnOpen(I18NConfig config) { base.OnOpen(config); Log.e("I18nTextTab open"); }
public virtual void OnOpen(I18NConfig config) { this.config = config; }