private void ExportMask() { GaiaWorldManager mgr = new GaiaWorldManager(Terrain.activeTerrains); if (mgr.TileCount > 0) { GaiaSessionManager gsm = GaiaSessionManager.GetSessionManager(); string path = GaiaDirectories.GetExportDirectory(gsm.m_session); path = Path.Combine(path, PWCommon4.Utils.FixFileName(m_maskName)); mgr.ExportSplatmapAsPng(path, m_selectedMask); Debug.Log("Created " + path); AssetDatabase.Refresh(); EditorUtility.FocusProjectWindow(); EditorUtility.DisplayDialog("Export complete", " Your texture mask has been saved to : " + path, "OK"); } else { EditorUtility.DisplayDialog("OOPS!", "You must have a valid terrain!!", "OK"); } }
private void ExportMask() { GaiaWorldManager mgr = new GaiaWorldManager(Terrain.activeTerrains); if (mgr.TileCount > 0) { string path = "Assets/GaiaMasks/"; if (!Directory.Exists(path)) { Directory.CreateDirectory(path); } path = Path.Combine(path, GaiaCommon1.Utils.FixFileName(m_maskName)); mgr.ExportSplatmapAsPng(path, m_selectedMask); Debug.Log("Created " + path); AssetDatabase.Refresh(); EditorUtility.FocusProjectWindow(); EditorUtility.DisplayDialog("Export complete", " Your texture mask has been saved to : " + path, "OK"); } else { EditorUtility.DisplayDialog("OOPS!", "You must have a valid terrain!!", "OK"); } }