Is it o.k to save custom per-project .asset files in /Library?

Just wondering if this is an “o.k” thing to do and will not mess with the Unity project?

Are there any issues with doing this?

I wanted to use it to store per-project default settings for an AssetPostprocessor class I’m making. i.e:

[ System.Serializable ]
public class TextureAtlasImportSettings : ScriptableObject {
/// data goes here
public static TextureAtlasImportSettings GetDefaultTextureAtlasImportSettings()
{
	string libraryPath = System.IO.Path.GetDirectoryName( Application.dataPath )
                                                                 + "/Library/";
	string settingsPath = libraryPath+"DefaultTextureAtlasImportSettings.asset";
	
	TextureAtlasImportSettings settings = (TextureAtlasImportSettings)
			AssetDatabase.LoadAssetAtPath( 
				settingsPath,
				typeof(TextureAtlasImportSettings) 
			);
	
	if ( settings == null ) {
		settings = CreateInstance<TextureAtlasImportSettings>();
		settings.name = "DefaultTextureAtlasImportSettings";
		AssetDatabase.CreateAsset( settings,settingsPath );
	}

	return settings;
}
}

AssetDatabase.CreateAsset only takes a relative path and it’s always inside the asset folder. You can’t use a full path. All Unity-stuff that belongs to your project have to be placed inside the asset folder. If you don’t want to include an asset into your build, just place it in an “editor” folder.

If you just want to store some settings you still can use plain .NET / Mono functions to write an xml file or something like that. This one you can place where ever you want, but your should leave the library folder alone. There’s no reason to place anything in there. You can create a seperate folder for your stuff (“config” or something like that).

But again all assets that are under control of Unity have to be placed inside the assets folder