Class VolumeProfileFactory
A utility class to create Volume Profiles and components.
Namespace: UnityEditor.Rendering
Syntax
public static class VolumeProfileFactory
Methods
CreateVolumeComponent<T>(VolumeProfile, Boolean, Boolean)
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. |
Boolean | overrides | specifies whether to override the parameters in the component or not. |
Boolean | 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. |