This commit is contained in:
2026-05-19 17:39:03 +07:00
parent bf0ebe447d
commit 5da832bb57
559 changed files with 69543 additions and 1 deletions

View File

@@ -0,0 +1,32 @@
using static Rive.File;
namespace Rive
{
/// <summary>
/// The Custom file asset loader allows you to pass in a custom handler for loading assets from the Rive file.
/// </summary>
internal class CustomFileAssetLoader : IFileAssetLoader
{
private CustomAssetLoaderCallback customLoader;
public CustomFileAssetLoader(CustomAssetLoaderCallback loader)
{
customLoader = loader;
}
public bool LoadContents(EmbeddedAssetReference assetReference)
{
// If the custom loader is null, then let the default loader handle it.
if (customLoader == null)
{
return false;
}
return customLoader(assetReference);
}
}
}