Files
Bombaleila/Library/PackageCache/com.unity.render-pipelines.core@04ab0eefa0c3/Runtime/UnifiedRayTracing/UnifiedRayTracingException.cs
2026-03-03 00:39:30 +05:00

42 lines
1.3 KiB
C#

using System;
namespace UnityEngine.Rendering.UnifiedRayTracing
{
/// <summary>
/// Represents errors that can occur during UnifiedRayTracing calls.
/// </summary>
public enum UnifiedRayTracingError
{
/// <summary>Unknown error.</summary>
Unknown,
/// <summary>Graphics Buffer allocation failed. It happens usually when the GPU runs out of memory. You can try to reduce your mesh data or your number of instances.</summary>
GraphicsBufferAllocationFailed
}
/// <summary>
/// Exception type that can be thrown in case of failure in UnifiedRayTracing calls.
/// </summary>
public class UnifiedRayTracingException : Exception
{
/// <summary>
/// Initializes a new instance of <see cref="UnifiedRayTracingException"/>
/// </summary>
/// <param name="message">Message describing the error.</param>
/// <param name="errorCode">The error code.</param>
public UnifiedRayTracingException(string message, UnifiedRayTracingError errorCode)
: base(message)
{
this.errorCode = errorCode;
}
/// <summary>
/// Gets the <see cref="UnifiedRayTracingError"/> code associated with the exception.
/// </summary>
public UnifiedRayTracingError errorCode { get; private set; }
}
}