public static exAtlasInfo Create( string _path, string _name )
{
//
if ( new DirectoryInfo(_path).Exists == false ) {
Debug.LogError ( "can't create asset, path not found" );
return null;
}
if ( string.IsNullOrEmpty(_name) ) {
Debug.LogError ( "can't create asset, the name is empty" );
return null;
}
string assetPath = Path.Combine( _path, _name + ".asset" );
//
exAtlasInfo newAtlas = ScriptableObject.CreateInstance<exAtlasInfo>();
AssetDatabase.CreateAsset(newAtlas, assetPath);
Selection.activeObject = newAtlas;
return newAtlas;
}