Class VolumeProfileFactory
A utility class to create Volume Profiles and components.
Inherited Members
Namespace: UnityEditor.Rendering
Assembly: Unity.RenderPipelines.Core.Editor.dll
Syntax
public static class VolumeProfileFactory
Methods
CreateVolumeComponent<T>(VolumeProfile, bool, bool)
Creates a VolumeComponent in an existing VolumeProfile.
Declaration
public static T CreateVolumeComponent<T>(VolumeProfile profile, bool overrides = false, bool saveAsset = true) where T : VolumeComponent
Parameters
Type | Name | Description |
---|---|---|
VolumeProfile | profile | The profile to store the new component in. |
bool | overrides | specifies whether to override the parameters in the component or not. |
bool | saveAsset | Specifies whether to save the Profile Asset or not. This is useful when you need to create several components in a row and only want to save the Profile Asset after adding the last one, because saving Assets to disk can be slow. |
Returns
Type | Description |
---|---|
T |
Type Parameters
Name | Description |
---|---|
T | A type of VolumeComponent. |
CreateVolumeProfile(Scene, string)
Creates a VolumeProfile Asset and saves it in a folder next to the Scene.
Declaration
public static VolumeProfile CreateVolumeProfile(Scene scene, string targetName)
Parameters
Type | Name | Description |
---|---|---|
Scene | scene | The Scene to save the Profile next to. |
string | targetName | A name to use for the Asset filename. |
Returns
Type | Description |
---|---|
VolumeProfile | The newly created VolumeProfile. |
CreateVolumeProfileAtPath(string)
Creates a VolumeProfile Asset and saves it at the given path.
Declaration
public static VolumeProfile CreateVolumeProfileAtPath(string path)
Parameters
Type | Name | Description |
---|---|---|
string | path | The path to save the Asset to, relative to the Project folder. |
Returns
Type | Description |
---|---|
VolumeProfile | The newly created VolumeProfile. |
CreateVolumeProfileAtPath(string, VolumeProfile)
Creates a VolumeProfile Asset and saves it at the given path.
Declaration
public static VolumeProfile CreateVolumeProfileAtPath(string path, VolumeProfile dataSource)
Parameters
Type | Name | Description |
---|---|---|
string | path | The path to save the Asset to, relative to the Project folder. |
VolumeProfile | dataSource | Another |
Returns
Type | Description |
---|---|
VolumeProfile | The newly created VolumeProfile. |
CreateVolumeProfileWithCallback(string, Action<VolumeProfile>)
Asks for editor user input for the asset name, creates a VolumeProfile Asset, saves it at the given path and invokes the callback.
Declaration
public static void CreateVolumeProfileWithCallback(string fullPath, Action<VolumeProfile> callback)
Parameters
Type | Name | Description |
---|---|---|
string | fullPath | The path to save the asset to. |
Action<VolumeProfile> | callback | Callback to invoke after the asset has been created. |