Class Feature
Base class of features (e.g., variants, packs) which has a non-empty string code and is contained in a feature set.
Inherited Members
Namespace: UnityEngine.Industrial.Configuring.Core
Syntax
[Serializable]
[ExecuteInEditMode]
public abstract class Feature : MonoBehaviour
Properties
code
Code of the feature.
Declaration
public string code { get; }
Property Value
Type | Description |
---|---|
String | The code. |
featureSet
Feature set which contains this feature (must not be
null
).
Declaration
public FeatureSet featureSet { get; }
Property Value
Type | Description |
---|---|
FeatureSet | The feature set. |
Exceptions
Type | Condition |
---|---|
InvalidOperationException | The feature {gameObject.name} is not part of a feature set: it is not the child of a game object with a FeatureSet component. |
Methods
SetCode(String)
Sets the code of this feature (must not be
null
or contain
only whitespaces).
Declaration
public void SetCode(string newCode)
Parameters
Type | Name | Description |
---|---|---|
String | newCode | The new code. |
Exceptions
Type | Condition |
---|---|
ArgumentException | Code must not be null or contain only whitespaces. |
ArgumentException | The feature with the code {newCode} already exists in the containing feature set. |
ArgumentException | Code must not be null or contain only whitespaces. |
ArgumentException | The feature with the code {newCode} already exists in the containing feature set. |
Events
codeChanged
Raised when the code of the feature has been changed.
Declaration
public event CodeChangedHandler codeChanged
Event Type
Type | Description |
---|---|
CodeChangedHandler |
globalFeatureChangedHandler
Occurs when [global feature changed handler].
Declaration
public static event CodeChangedHandler globalFeatureChangedHandler
Event Type
Type | Description |
---|---|
CodeChangedHandler |