Class RenderPipelineGlobalSettingsUtils
Set of utilities for RenderPipelineGlobalSettings
Inherited Members
Namespace: UnityEngine.Rendering
Assembly: Unity.RenderPipelines.Core.Runtime.dll
Syntax
public class RenderPipelineGlobalSettingsUtils
Methods
Create(Type, string, RenderPipelineGlobalSettings)
Creates a RenderPipelineGlobalSettings asset
Declaration
public static RenderPipelineGlobalSettings Create(Type renderPipelineGlobalSettingsType, string path, RenderPipelineGlobalSettings dataSource = null)
Parameters
Type | Name | Description |
---|---|---|
Type | renderPipelineGlobalSettingsType | |
string | path | The path where Unity generates the asset. |
RenderPipelineGlobalSettings | dataSource | Another |
Returns
Type | Description |
---|---|
RenderPipelineGlobalSettings | Returns the asset created. |
Create<TGlobalSetting>(string, TGlobalSetting)
Creates a RenderPipelineGlobalSettings asset
Declaration
public static TGlobalSetting Create<TGlobalSetting>(string path, TGlobalSetting dataSource = null) where TGlobalSetting : RenderPipelineGlobalSettings
Parameters
Type | Name | Description |
---|---|---|
string | path | The path where Unity generates the asset. |
TGlobalSetting | dataSource | Another |
Returns
Type | Description |
---|---|
TGlobalSetting | Returns the asset created. |
Type Parameters
Name | Description |
---|---|
TGlobalSetting |
TryEnsure<TGlobalSetting, TRenderPipeline>(ref TGlobalSetting, string, bool)
Checks that a RenderPipelineGlobalSettings asset exists. If the asset isn't valid, Unity tries the following in order:
- Loads the asset at the default path.
- Finds any asset in the project with the same type.
- If
canCreateNewAsset
is true, creates a new asset in the default path. If Unity finds or creates a valid asset, Unity updates the GraphicsSettings with it. Otherwise Unity will unregister the settings for the given pipeline.
Declaration
public static bool TryEnsure<TGlobalSetting, TRenderPipeline>(ref TGlobalSetting instance, string defaultPath = "", bool canCreateNewAsset = true) where TGlobalSetting : RenderPipelineGlobalSettings<TGlobalSetting, TRenderPipeline> where TRenderPipeline : RenderPipeline
Parameters
Type | Name | Description |
---|---|---|
TGlobalSetting | instance | The current instance of the asset. |
string | defaultPath | The default path. |
bool | canCreateNewAsset | If set to |
Returns
Type | Description |
---|---|
bool | The asset that Unity found or created, or |
Type Parameters
Name | Description |
---|---|
TGlobalSetting | The type of global settings asset to check. |
TRenderPipeline | The type of |