Version: Unity 6.7 Beta (6000.7)
LanguageEnglish
  • C#

UnityWebRequest.enableProfilerBodyCapture

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

public static bool enableProfilerBodyCapture;

Description

Whether the Profiler captures the bodies of web requests.

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.