On Android, the tool logs errors if it finds compressed files in the assets directory (which might indicate a configuration error). If you have custom plugin files in assets that are intentionally compressed and you want to prevent these logs, you have two options:
Option 1: Use the IsAndroidCompressedStreamingAsset event
Add an event handler in the same assembly as BetterStreamingAssets:
BetterStreamingAssets.IsAndroidCompressedStreamingAsset += (path) =>
{
if (path == "assets/my_custom_plugin_settings.json")
{
return false; // Not a Streaming Asset, ignore compression error
}
return true; // It is a Streaming Asset, log error if compressed
};
Option 2: Implement the partial method
Implement the partial method in the same asmdef as BetterStreamingAssets:
partial class BetterStreamingAssets
{
static partial void AndroidIsCompressedFileStreamingAsset(string path, ref bool result)
{
if (path == "assets/my_custom_plugin_settings.json")
{
result = false;
}
}
}
BetterStreamingAssets.IsAndroidCompressedStreamingAsset += (path) =>
{
if (path == "assets/my_custom_plugin_settings.json")
{
return false;
}
return true;
};