文档

Unity Engine

Unity Engine

GetValidationErrorsDroppedCount()

Returns the number of graphics API validation errors that were dropped because the internal error buffer was full.
阅读时间1 分钟最后更新于 1 个月前

Definition

public static int GetValidationErrorsDroppedCount()

Returns

Type

Description

intThe number of dropped validation errors.

Remarks

A non-zero return value indicates that some validation errors weren't stored and can't be retrieved with GraphicsApiValidation.GetValidationError. The dropped count is reset by GraphicsApiValidation.ClearValidationErrors.

Examples

using UnityEngine;using UnityEngine.Rendering;public class Example : MonoBehaviour{ void WarnIfDropped() { int dropped = GraphicsApiValidation.GetValidationErrorsDroppedCount(); if (dropped > 0) Debug.LogWarning($"Dropped {dropped} graphics API validation errors (buffer full)."); }}