Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


Description

User defined metadata that provides a description for the memory snapshot.
Read time 1 minuteLast updated 6 days ago

Definition

public string Description { get; set; }

Remarks

This propery provides a free form text input method to extend the memory snapshot with extra information such as the context in which the snapshot was taken.

Examples

using System;using UnityEngine;using Unity.Profiling.Memory;public class MemoryProfilerExample : MonoBehaviour{ public string levelName = "Default Level Name"; void Start() { MemoryProfiler.CreatingMetadata += CreateMetadata; } void CreateMetadata(MemorySnapshotMetadata metadata) { metadata.Description = $"This Memory Snapshot capture started at {DateTime.Now} in level {levelName}."; } void OnDestroy() { MemoryProfiler.CreatingMetadata -= CreateMetadata; }}