Class NameComponent
Base class for all NameComponent classes. To create your own NameComponent derive from this an implement the needed virtual methods.
Inheritance
Inherited Members
Namespace: Unity.Simulation
Assembly: Unity.Simulation.Core.dll
Syntax
[Serializable]
public abstract class NameComponent
Constructors
NameComponent(string, string)
Constructor to pass in the affixes.
Declaration
public NameComponent(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. |
Fields
prefix
Each NameComponent can have a prefix and a suffix. Typical affixes are _ or . You can configure these in the inspector, or pass them in to the constructor.
Declaration
public string prefix
Field Value
| Type | Description |
|---|---|
| string |
suffix
Declaration
public string suffix
Field Value
| Type | Description |
|---|---|
| string |
Methods
Generate(string, bool)
Generate this NameComponent's part of the path. This will be appended to the previous path instance.
Declaration
public virtual 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 |
Reset()
Reset the NameComponent back to its configuration state.
Declaration
public virtual void Reset()