Shape and coloring
This commit is contained in:
@@ -16,7 +16,7 @@ namespace Darkmatter.Services.Capture
|
||||
_cameraService = cameraService;
|
||||
}
|
||||
|
||||
public async UniTask<Sprite> CapturePngAsync(GameObject captureObject, float captureSize,
|
||||
public async UniTask<byte[]> CapturePngAsync(GameObject captureObject, float captureSize,
|
||||
CancellationToken cancellationToken = default)
|
||||
{
|
||||
var captureCamera = _cameraService.GetCamera(CameraType.CaptureCamera);
|
||||
@@ -40,7 +40,7 @@ namespace Darkmatter.Services.Capture
|
||||
texture.ReadPixels(new Rect(0, 0, size, size), 0, 0);
|
||||
texture.Apply();
|
||||
|
||||
return Sprite.Create(texture, new Rect(0, 0, size, size), new Vector2(0.5f, 0.5f));
|
||||
return texture.EncodeToPNG();
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user