Class PromptOperator
Inherited Members
Namespace: Unity.Muse.Common
Syntax
[Serializable]
public class PromptOperator : IOperator
Constructors
PromptOperator()
Declaration
public PromptOperator()
Fields
MinimumPromptLength
Declaration
public const int MinimumPromptLength = 1
Field Value
Type | Description |
---|---|
Int32 |
Properties
Label
Human-readable label for the operator.
Declaration
public string Label { get; }
Property Value
Type | Description |
---|---|
String |
Implements
OperatorName
Declaration
public string OperatorName { get; }
Property Value
Type | Description |
---|---|
String |
Implements
Methods
Clone()
Clones the operator.
Declaration
public IOperator Clone()
Returns
Type | Description |
---|---|
IOperator | The cloned operator. |
Implements
Enable(Boolean)
Sets the enabled state of the operator.
Declaration
public void Enable(bool enable)
Parameters
Type | Name | Description |
---|---|---|
Boolean | enable | The new state to set. |
Implements
Enabled()
Gets the enabled state of the operator.
Declaration
public bool Enabled()
Returns
Type | Description |
---|---|
Boolean | The enabled state. |
Implements
GetCanvasView()
Declaration
public VisualElement GetCanvasView()
Returns
Type | Description |
---|---|
VisualElement |
Implements
GetOperatorData()
Gets the operator data.
Declaration
public OperatorData GetOperatorData()
Returns
Type | Description |
---|---|
OperatorData | The operator data. |
Implements
GetOperatorView(Model)
Declaration
public VisualElement GetOperatorView(Model model)
Parameters
Type | Name | Description |
---|---|---|
Model | model |
Returns
Type | Description |
---|---|
VisualElement |
Implements
GetPrompt()
Gets the prompt for this operator.
Declaration
public string GetPrompt()
Returns
Type | Description |
---|---|
String | The operator's prompt. |
GetSettingsView()
Get the settings view for this operator.
Declaration
public VisualElement GetSettingsView()
Returns
Type | Description |
---|---|
VisualElement | UI for the operator. Set to Null if the operator should not be displayed in the settings view. Disable the returned VisualElement if you want it to be displayed but not usable. |
Implements
IsPromptValid()
Declaration
public bool IsPromptValid()
Returns
Type | Description |
---|---|
Boolean |
IsSavable()
Declaration
public bool IsSavable()
Returns
Type | Description |
---|---|
Boolean |
Implements
RegisterToEvents(Model)
Registers the operator to the model events.
Declaration
public void RegisterToEvents(Model model)
Parameters
Type | Name | Description |
---|---|---|
Model | model |
Implements
SetOperatorData(OperatorData)
Sets the operator data.
Declaration
public void SetOperatorData(OperatorData data)
Parameters
Type | Name | Description |
---|---|---|
OperatorData | data | The data to use. |
Implements
UnregisterFromEvents(Model)
Unregisters the operator from the model events.
Declaration
public void UnregisterFromEvents(Model model)
Parameters
Type | Name | Description |
---|---|---|
Model | model |