Version: 2022.2
public bool Valid ;

描述

Indicates whether ProfilerRecorder is associated with a valid Profiler marker or counter.

Returns true if ProfilerRecorder is associated with a valid Profiler marker or counter.

False is returned if a ProfilerMarker or ProfilerCounter hasn't been created yet. Use the Valid property to determine if the sample data can be used.