docs.unity3d.com
    Show / Hide Table of Contents

    Struct GetPosition

    Provides methods to calculate, in parallel, the positions along NativeSpline.

    Inherited Members
    ValueType.Equals(Object)
    ValueType.GetHashCode()
    ValueType.ToString()
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetType()
    Namespace: UnityEngine.Splines
    Syntax
    public struct GetPosition : IJobParallelFor

    Fields

    Positions

    A NativeArray of float3 to be written. The size of this array determines how many positions are evaluated.

    Declaration
    [WriteOnly]
    public NativeArray<float3> Positions
    Field Value
    Type Description
    NativeArray<float3>

    Spline

    The NativeSpline to be evaluated.

    Declaration
    [ReadOnly]
    public NativeSpline Spline
    Field Value
    Type Description
    NativeSpline
    Remarks

    Must be allocated with a Allocator.Persistent or Allocator.TempJob.

    Methods

    Execute(Int32)

    Called by the job system to evaluate a position at an index. The interpolation value is calculated as index / positions.Length - 1.

    Declaration
    public void Execute(int index)
    Parameters
    Type Name Description
    Int32 index

    The index of the positions array to evaluate.

    Implements
    IJobParallelFor.Execute(Int32)
    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