# GetRayGenerationShaderName(RayTracingShader, int)

> Returns the name of a user-defined ray generation Shader from within a RayTracingShader.

## Definition

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

```csharp
public static string GetRayGenerationShaderName(RayTracingShader s, int shaderIndex)
```

### Parameters

**** (\[RayTracingShader]\(/engine/6000.3/script-reference/unityengine/rendering/raytracingshader)): The [RayTracingShader](/engine/6000.3/script-reference/unityengine/rendering/raytracingshader.md) instance.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The ray generation Shader index for which to retrieve the name.

### Returns

| Type                                                           | Description                                                                                 |
| -------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
| [string](https://learn.microsoft.com/dotnet/api/system.string) | The name of the ray generation Shader at the index passed using the "shaderIndex" argument. |

### Remarks

Additional Resources: [ShaderUtil.GetRayGenerationShaderCount](/engine/6000.3/script-reference/unityeditor/shaderutil/getraygenerationshadercount.md).
