public static AsyncOperationHandle <Texture2D> LoadTexture2DAsync(AssetReferenceTexture2D pAsset, Action <float> pProgress = null, Action <Texture2D> pOnCompleted = null) { var operation = pAsset.LoadAssetAsync(); WaitLoadTask(operation, pProgress, pOnCompleted); return(operation); }
public async Task <Texture2D> LoadTexture(AssetReferenceTexture2D addressable) { AsyncOperationHandle <Texture2D> handle = addressable.LoadAssetAsync(); await handle.Task; return(handle.Result); }
public void ReleaseTexture(AssetReferenceTexture2D addressable) { addressable.ReleaseAsset(); }