Class DirectoryNameComponent
NameComponent that produces the directory path for the path.
Inherited Members
Namespace: Unity.Simulation
Assembly: Unity.Simulation.Core.dll
Syntax
[Serializable]
public class DirectoryNameComponent : NameComponent
Constructors
DirectoryNameComponent()
Default Constructor
Declaration
public DirectoryNameComponent()
DirectoryNameComponent(string, string)
Constructor to pass in the affixes.
Declaration
public DirectoryNameComponent(string prefix = "", string suffix = "")
Parameters
| Type | Name | Description |
|---|---|---|
| string | prefix | This will be prepended to the output from this NameComponent |
| string | suffix | This will be appended to the output from this NameComponent |
Methods
Generate(string, bool)
Returns the directory portion of the base path. Directories will always end in a / and paths with \ will be converted to /
Declaration
public override string Generate(string path, bool modify = true)
Parameters
| Type | Name | Description |
|---|---|---|
| string | path | Base path used to generate a new path. |
| bool | modify | If false, the NameComponent will not modify its state. This is equivalent to Reset() followed by Generate(). |
Returns
| Type | Description |
|---|---|
| string | The path component generated by this NameComponent |