Class VFXTemplateHelper
Helper class to create or update a Visual Effect asset template
Inherited Members
Namespace: UnityEditor.VFX
Assembly: Unity.VisualEffectGraph.Editor.dll
Syntax
public static class VFXTemplateHelper
Methods
TryGetTemplate(string, out VFXTemplateDescriptor)
This method gets template information for any Visual Effect asset.
Declaration
public static bool TryGetTemplate(string vfxPath, out VFXTemplateDescriptor vfxTemplateDescriptor)
Parameters
| Type | Name | Description |
|---|---|---|
| string | vfxPath | The path to a Visual Effect asset. |
| VFXTemplateDescriptor | vfxTemplateDescriptor | The structure that contains template information. |
Returns
| Type | Description |
|---|---|
| bool | Returns true if the Visual Effect asset has template information, otherwise it returns false. |
TrySetTemplate(string, VFXTemplateDescriptor)
This method creates or updates a Visual Effect asset template.
Declaration
public static bool TrySetTemplate(string vfxPath, VFXTemplateDescriptor vfxTemplateDescriptor)
Parameters
| Type | Name | Description |
|---|---|---|
| string | vfxPath | The path to the existing Visual Effect asset. |
| VFXTemplateDescriptor | vfxTemplateDescriptor | The structure that contains all template information. |
Returns
| Type | Description |
|---|---|
| bool | Returns true if the template is created, otherwise it returns false. |