# GetAnyHitShaderRayPayloadSize(RayTracingShader)

> Returns the ray payload size of a user-defined any hit shader from within a RayTracingShader.

## Definition

* **Type:** Method
* **Namespace:** [UnityEditor](/engine/6000.7/script-reference/unityeditor.md)
* **Assembly:** UnityEditor.CoreModule

```csharp
public static int GetAnyHitShaderRayPayloadSize(RayTracingShader s)
```

### Parameters

**** (\[RayTracingShader]\(/engine/6000.7/script-reference/unityengine/rendering/raytracingshader)): The [RayTracingShader](/engine/6000.7/script-reference/unityengine/rendering/raytracingshader.md) instance.

### Returns

| Type                                                       | Description                    |
| ---------------------------------------------------------- | ------------------------------ |
| [int](https://learn.microsoft.com/dotnet/api/system.int32) | The ray payload size in bytes. |
