update
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user