Class ActionResult
Contains information about a ProBuilder action (success, failure, notification, etc)
Namespace: UnityEngine.ProBuilder
Syntax
public sealed class ActionResult
Constructors
ActionResult(ActionResult.Status, String)
Create a new ActionResult.
Declaration
public ActionResult(ActionResult.Status status, string notification)
Parameters
Type | Name | Description |
---|---|---|
ActionResult.Status | status | State of affairs after an action. |
String | notification | A short summary of the action performed. |
Properties
NoSelection
Generic "No Selection" action result with "Nothing Selected" notification.
Declaration
public static ActionResult NoSelection { get; }
Property Value
Type | Description |
---|---|
ActionResult |
notification
Short description of the results. Should be no longer than a few words.
Declaration
public string notification { get; }
Property Value
Type | Description |
---|---|
String |
status
State of affairs after the operation.
Declaration
public ActionResult.Status status { get; }
Property Value
Type | Description |
---|---|
ActionResult.Status |
Success
Generic "Success" action result with no notification text.
Declaration
public static ActionResult Success { get; }
Property Value
Type | Description |
---|---|
ActionResult |
UserCanceled
Generic "Canceled" action result with "User Canceled" notification.
Declaration
public static ActionResult UserCanceled { get; }
Property Value
Type | Description |
---|---|
ActionResult |
Methods
FromBool(Boolean)
Declaration
public static bool FromBool(bool success)
Parameters
Type | Name | Description |
---|---|---|
Boolean | success |
Returns
Type | Description |
---|---|
Boolean |
ToBool()
Declaration
public bool ToBool()
Returns
Type | Description |
---|---|
Boolean |
Operators
Implicit(ActionResult to Boolean)
Convert a result to a boolean value, true if successful and false if not.
Declaration
public static implicit operator bool (ActionResult res)
Parameters
Type | Name | Description |
---|---|---|
ActionResult | res |
Returns
Type | Description |
---|---|
Boolean | True if action was successful, false otherwise. |