Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ private async Task<string> ReceiveMessageAsync(CancellationToken token)
return null;
}

byte[] rentedBuffer = ArrayPool<byte>.Shared.Rent(8192);
byte[] rentedBuffer = System.Buffers.ArrayPool<byte>.Shared.Rent(8192);
var buffer = new ArraySegment<byte>(rentedBuffer);
using var ms = new MemoryStream(8192);

Expand Down Expand Up @@ -381,7 +381,7 @@ private async Task<string> ReceiveMessageAsync(CancellationToken token)
}
finally
{
ArrayPool<byte>.Shared.Return(rentedBuffer);
System.Buffers.ArrayPool<byte>.Shared.Return(rentedBuffer);
}
}

Expand Down
2 changes: 2 additions & 0 deletions MCPForUnity/Runtime/Helpers/ScreenshotUtility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ public static ScreenshotCaptureResult CaptureToAssetsFolder(string fileName = nu

// Use only the file name to let Unity decide the final location (per CaptureScreenshot docs).
string captureName = Path.GetFileName(normalizedFullPath);
#if UNITY_2022_1_OR_NEWER
ScreenCapture.CaptureScreenshot(captureName, size);
#endif

Debug.Log($"Screenshot requested: file='{captureName}' intendedFullPath='{normalizedFullPath}' persistentDataPath='{Application.persistentDataPath}'");

Expand Down