기술 자료

Unity Engine

Unity Engine

Description

User defined metadata that provides a description for the memory snapshot.
읽는 시간 1분최근 업데이트: 한 달 전

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; }}