Class ActionResult | ProBuilder | 4.3.1
docs.unity3d.com
    Show / Hide Table of Contents

    Class ActionResult

    Contains information about a ProBuilder action (success, failure, notification, etc)

    Inheritance
    Object
    ActionResult
    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.

    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023