# UnregisterRenderPipelineSettings

> The method removes the association between the given RenderPipeline and the RenderPipelineGlobalSettings asset from GraphicsSettings.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine.Rendering](/engine/6000.6/script-reference/unityengine/rendering.md)
* **Assembly:** UnityEngine.CoreModule

## UnregisterRenderPipelineSettings\<T>()

The method removes the association between the given [RenderPipeline](/engine/6000.6/script-reference/unityengine/rendering/renderpipeline.md) and the [RenderPipelineGlobalSettings](/engine/6000.6/script-reference/unityengine/rendering/renderpipelineglobalsettings.md) asset from GraphicsSettings.

> **Warning:**
>
> **Deprecated.** Please use EditorGraphicsSettings.SetRenderPipelineGlobalSettingsAsset\\\<TRenderPipelineType\\>(null). #from(23.2)

```csharp
public static void UnregisterRenderPipelineSettings<T>() where T : RenderPipeline
```

### Examples

```csharp
using UnityEngine;
using UnityEngine.Rendering;

public class ExampleRenderPipelineAsset : RenderPipelineAsset
{
    protected override RenderPipeline CreatePipeline()
    {
        return new ExampleRenderPipeline();
    }
}

public class ExampleRenderPipeline : RenderPipeline
{
    public ExampleRenderPipeline()
    {
        var mySettings = ExampleRPGlobalSettings.Create();
        ExampleRPGlobalSettings.RegisterToGraphicsSettings(mySettings);
    }

    protected override void Render(ScriptableRenderContext renderContext, Camera[] cameras)
    {
        // Do something
    }

    public virtual RenderPipelineGlobalSettings globalSettings
    {
        get { return ExampleRPGlobalSettings.instance; }
    }

    protected virtual void Dispose(bool disposing)
    {
        ExampleRPGlobalSettings.UnregisterToGraphicsSettings();
    }
}

public class ExampleRPGlobalSettings : RenderPipelineGlobalSettings
{
    private static ExampleRPGlobalSettings cachedInstance = null;
    public static ExampleRPGlobalSettings instance
    {
        get
        {
            if (cachedInstance == null)
                cachedInstance = GraphicsSettings.GetSettingsForRenderPipeline<ExampleRenderPipeline>() as ExampleRPGlobalSettings;
            return cachedInstance;
        }
    }

    public static void RegisterToGraphicsSettings(ExampleRPGlobalSettings newSettings)
    {
        GraphicsSettings.RegisterRenderPipelineSettings<ExampleRenderPipeline>(newSettings as RenderPipelineGlobalSettings);
        cachedInstance = null;
    }

    public static void UnregisterToGraphicsSettings()
    {
        GraphicsSettings.UnregisterRenderPipelineSettings<ExampleRenderPipeline>();
        cachedInstance = null;
    }

    static public ExampleRPGlobalSettings Create()
    {
        ExampleRPGlobalSettings assetCreated = ScriptableObject.CreateInstance<ExampleRPGlobalSettings>();
        return assetCreated;
    }
}
```

## UnregisterRenderPipelineSettings(Type)

The method removes the association between the given [RenderPipeline](/engine/6000.6/script-reference/unityengine/rendering/renderpipeline.md) and the [RenderPipelineGlobalSettings](/engine/6000.6/script-reference/unityengine/rendering/renderpipelineglobalsettings.md) asset from GraphicsSettings.

> **Warning:**
>
> **Deprecated.** Please use EditorGraphicsSettings.SetRenderPipelineGlobalSettingsAsset(renderPipelineType, null). #from(23.2)

```csharp
public static void UnregisterRenderPipelineSettings(Type renderPipelineType)
```

### Parameters

**** (\[Type]\(https\://learn.microsoft.com/dotnet/api/system.type)): The type of [RenderPipeline](/engine/6000.6/script-reference/unityengine/rendering/renderpipeline.md).

### Examples

```csharp
using UnityEngine;
using UnityEngine.Rendering;

public class ExampleRenderPipelineAsset : RenderPipelineAsset
{
    protected override RenderPipeline CreatePipeline()
    {
        return new ExampleRenderPipeline();
    }
}

public class ExampleRenderPipeline : RenderPipeline
{
    public ExampleRenderPipeline()
    {
        var mySettings = ExampleRPGlobalSettings.Create();
        ExampleRPGlobalSettings.RegisterToGraphicsSettings(mySettings);
    }

    protected override void Render(ScriptableRenderContext renderContext, Camera[] cameras)
    {
        // Do something
    }

    public virtual RenderPipelineGlobalSettings globalSettings
    {
        get { return ExampleRPGlobalSettings.instance; }
    }

    protected virtual void Dispose(bool disposing)
    {
        ExampleRPGlobalSettings.UnregisterToGraphicsSettings();
    }
}

public class ExampleRPGlobalSettings : RenderPipelineGlobalSettings
{
    private static ExampleRPGlobalSettings cachedInstance = null;
    public static ExampleRPGlobalSettings instance
    {
        get
        {
            if (cachedInstance == null)
                cachedInstance = GraphicsSettings.GetSettingsForRenderPipeline<ExampleRenderPipeline>() as ExampleRPGlobalSettings;
            return cachedInstance;
        }
    }

    public static void RegisterToGraphicsSettings(ExampleRPGlobalSettings newSettings)
    {
        GraphicsSettings.RegisterRenderPipelineSettings<ExampleRenderPipeline>(newSettings as RenderPipelineGlobalSettings);
        cachedInstance = null;
    }

    public static void UnregisterToGraphicsSettings()
    {
        GraphicsSettings.UnregisterRenderPipelineSettings<ExampleRenderPipeline>();
        cachedInstance = null;
    }

    static public ExampleRPGlobalSettings Create()
    {
        ExampleRPGlobalSettings assetCreated = ScriptableObject.CreateInstance<ExampleRPGlobalSettings>();
        return assetCreated;
    }
}
```
