Struct ConditionTask | Kinematica | 0.5.0-preview.1
docs.unity3d.com
    Show / Hide Table of Contents

    Struct ConditionTask

    The condition task executes its child based on an internal condition that can be controlled externally.

    Namespace: Unity.Kinematica
    Syntax
    [Data("Condition", "#2A3756", DataType.Flag.None)]
    public struct ConditionTask : Task

    Fields

    value

    Denotes the internal state of the condition task.

    Declaration
    public BlittableBool value
    Field Value
    Type Description
    BlittableBool

    Methods

    Action()

    Creates a new action task as a child of the condition task.

    Declaration
    public ActionTask Action()
    Returns
    Type Description
    ActionTask

    Reference to the newly created action task.

    Execute()

    Execute method for the condition task.

    Declaration
    public Result Execute()
    Returns
    Type Description
    Result

    Result of the condition task.

    Implements
    Task.Execute()
    Remarks

    The condition task executes its first child if its internal value is set to true. In this case the condition task returns the status of the child task, Failure otherwise.

    ExecuteSelf(ref TaskRef)

    Surrogate method for automatic task execution.

    Declaration
    public static Result ExecuteSelf(ref TaskRef self)
    Parameters
    Type Name Description
    TaskRef self

    Task reference that is supposed to be executed.

    Returns
    Type Description
    Result

    Result of the task execution.

    Parallel()

    Creates a new parallel task as a child of the condition task.

    Declaration
    public ParallelTask Parallel()
    Returns
    Type Description
    ParallelTask

    Reference to the newly created parallel task.

    Selector()

    Creates a new selector task as a child of the condition task.

    Declaration
    public SelectorTask Selector()
    Returns
    Type Description
    SelectorTask

    Reference to the newly created selector task.

    Sequence(Boolean, Boolean)

    Creates a new sequence task as a child of the condition task.

    Declaration
    public SequenceTask Sequence(bool loop = false, bool resetWhenNotExecuted = true)
    Parameters
    Type Name Description
    Boolean loop

    If false, once the sequence has finished executing all its children, it will do nothing and just return success. If true, sequence will reexecute all its children tasks indefinitely.

    Boolean resetWhenNotExecuted

    If true, and if the sequence isn't executed during one task graph pass, next time the sequence will be executed again, it will restart execution from its first child.

    Returns
    Type Description
    SequenceTask

    Reference to the newly created sequence task.

    Operators

    Implicit(ConditionTask to Boolean)

    Implicit cast operator that allows to convert a condition task to a bool.

    Declaration
    public static implicit operator bool (ConditionTask task)
    Parameters
    Type Name Description
    ConditionTask task
    Returns
    Type Description
    Boolean

    Implicit(ConditionTask to Identifier<ConditionTask>)

    Implicit cast operator that allows to convert a condition task into a typed identifier.

    Declaration
    public static implicit operator Identifier<ConditionTask>(ConditionTask task)
    Parameters
    Type Name Description
    ConditionTask task
    Returns
    Type Description
    Identifier<ConditionTask>

    Implicit(ConditionTask to MemoryIdentifier)

    Implicit cast operator that allows to convert a condition task into an identifier.

    Declaration
    public static implicit operator MemoryIdentifier(ConditionTask task)
    Parameters
    Type Name Description
    ConditionTask task
    Returns
    Type Description
    MemoryIdentifier
    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