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

    Struct SequenceTask

    The sequence task executes all of its children in order until it encounters a success status.

    Namespace: Unity.Kinematica
    Syntax
    [Data("Sequence", "#2A5637", DataType.Flag.None)]
    public struct SequenceTask : Task

    Methods

    Action()

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

    Declaration
    public ActionTask Action()
    Returns
    Type Description
    ActionTask

    Reference to the newly created action task.

    Condition()

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

    Declaration
    public ConditionTask Condition()
    Returns
    Type Description
    ConditionTask

    Reference to the newly created condition task.

    Execute()

    Execute method for the sequence task.

    Declaration
    public Result Execute()
    Returns
    Type Description
    Result

    Result success if a child task executes successfully or if all children have already been successfuly executed (the sequence is then considered to be finished); false otherwise.

    Implements
    Task.Execute()
    Remarks

    The sequence task executes all of its children in order, one per frame. If one child task execution fails, it will be re-executed again next frame, and so on until it succeeds.

    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 sequence 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 sequence 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 sequence 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(SequenceTask to MemoryIdentifier)

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

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