Shape and coloring

This commit is contained in:
Savya Bikram Shah
2026-05-29 13:19:15 +05:45
parent 96e69c3d1a
commit 774a7159d3
118 changed files with 29144 additions and 18646 deletions

View File

@@ -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
{