/// <summary> /// Begin the profiling block. /// </summary> /// <param name="cmd">Command buffer used by the profiling block.</param> public void Begin(CommandBuffer cmd) { if (cmd != null) #if UNITY_USE_RECORDER { if (sampler != null) { cmd.BeginSample(sampler); } else { cmd.BeginSample(name); } } #else { cmd.BeginSample(name); } #endif inlineSampler?.Begin(); }
public ProfilingSample(CommandBuffer cmd, string name, CustomSampler sampler = null) { m_Cmd = cmd; m_Name = name; m_Disposed = false; cmd?.BeginSample(name); m_Sampler = sampler; m_Sampler?.Begin(); }
private void BeginBuffer(CommandBuffer buffer) { //begin && execute buffer buffer.BeginSample(buffer.name); ExecuteBuffer(buffer); }