# GetRayTracingFeaturesSupportForPlatform(BuildTarget, bool)

> Gets the ray tracing features that the specified target platform supports.

## Definition

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

```csharp
public static RayTracingFeatureFlags GetRayTracingFeaturesSupportForPlatform(BuildTarget platform, bool checkGraphicsApisList)
```

### Parameters

**** (\[BuildTarget]\(/engine/6000.6/script-reference/unityeditor/buildtarget)): The target platform to check. Use   [EditorUserBuildSettings.activeBuildTarget](/engine/6000.6/script-reference/unityeditor/editoruserbuildsettings/activebuildtarget.md) to specify the current Build target.**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): Set to `true` to check the graphics API list in the Player settings.

### Returns

| Type                                                                                            | Description                                                                            |
| ----------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
| [RayTracingFeatureFlags](/engine/6000.6/script-reference/unityeditor/raytracingfeatureflags.md) | A list of flags that represent ray tracing features that the target platform supports. |

### Remarks

If `checkGraphicsApisList` is `true`, this method checks the graphics API list configured in the Player settings for the given platform. If none of the graphics APIs support a specific ray tracing feature, no flags are returned.

Additional Resources: [RayTracingFeatureFlags](/engine/6000.6/script-reference/unityeditor/raytracingfeatureflags.md).

```csharp
using UnityEngine;
using UnityEditor;

public class CheckRayTracingFeatures : MonoBehaviour
{
    void Start()
    {
        BuildTarget buildTarget = UnityEditor.EditorUserBuildSettings.activeBuildTarget;

        RayTracingFeatureFlags features = PlayerSettings.GetRayTracingFeaturesSupportForPlatform(buildTarget, true);

        Debug.Log("Checking target platform " + buildTarget + " for ray tracing features.");

        if (features == RayTracingFeatureFlags.None)
        {
            Debug.Log("The target platform doesn't support any ray tracing features.");
        }
        else
        {
            if ((features & RayTracingFeatureFlags.InlineRayTracing) != 0)
                Debug.Log("The target platform supports Inline Ray Tracing.");

            if ((features & RayTracingFeatureFlags.RayTracingShaders) != 0)
                Debug.Log("The target platform supports Ray Tracing Shaders.");
        }
    }
}
```

The example above checks and reports any ray tracing features supported by the active build target platform.
