enableProfilerBodyCapture
Whether the Profiler captures the bodies of web requests.
Read time 1 minuteLast updated 13 days ago
Definition
- Type: Property
- Namespace: UnityEngine.Networking
- Assembly: UnityEngine.UnityWebRequestModule
public static bool enableProfilerBodyCapture { get; set; }
Remarks
Off by default, and off is the safe setting: request and response bodies routinely carry access tokens, personal data and payment details, and a Profiler capture is saved to a .raw file that gets shared and attached to bug reports. Switch it on only while you need it.
At most 16 KB of each body is kept, so 32 KB per request, and only for text-like content types - JSON, XML, plain text, form encoding and the +json and +xml suffixes. A longer body is truncated and the Profiler says so; a binary one is not captured at all and the Profiler says that instead.
Set it in the code of the player you are profiling. Setting it in the Editor covers requests the Editor itself makes, which includes Play mode, but does not reach a connected player.