// SPDX-FileCopyrightText: 2023 Unity Technologies and the glTFast authors
// SPDX-License-Identifier: Apache-2.0
using System.Threading.Tasks;
using UnityEngine;
namespace GLTFast.Loading
{
///
/// Used for wrapping
///
abstract class TextureDownloadBase
{
public IDownload Download { get; protected set; }
///
/// Executes the texture loading process and assigns the result to
/// .
///
///
public abstract Task Load();
}
///
/// Used for wrapping
///
class TextureDownload : TextureDownloadBase where T : IDownload
{
Task m_Task;
public TextureDownload(Task task)
{
m_Task = task;
}
public override async Task Load()
{
Download = await m_Task;
}
}
}