docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct NativeGradient

    Implements
    IDisposable
    Namespace: NativeParticleSystemGradient
    Assembly: solution.dll
    Syntax
    public struct NativeGradient : IDisposable

    Constructors

    NativeGradient(in Gradient, in AllocatorHandle)

    Declaration
    public NativeGradient(in Gradient unityGradient, in AllocatorManager.AllocatorHandle allocatorHandle)
    Parameters
    Type Name Description
    Gradient unityGradient
    AllocatorManager.AllocatorHandle allocatorHandle

    Fields

    alphaKeys

    Declaration
    public NativeArray<GradientAlphaKey> alphaKeys
    Field Value
    Type Description
    NativeArray<GradientAlphaKey>

    colorKeys

    Declaration
    public NativeArray<NativeGradientColorKey> colorKeys
    Field Value
    Type Description
    NativeArray<NativeGradientColorKey>

    colorSpace

    Declaration
    public ColorSpace colorSpace
    Field Value
    Type Description
    ColorSpace

    mode

    Declaration
    public GradientMode mode
    Field Value
    Type Description
    GradientMode

    Methods

    Create(out NativeGradient, in NativeArray<NativeGradientColorKey>, in NativeArray<GradientAlphaKey>, GradientMode, ColorSpace, in AllocatorHandle)

    Declaration
    public static void Create(out NativeGradient nativeGradient, in NativeArray<NativeGradientColorKey> colorKeys, in NativeArray<GradientAlphaKey> alphaKeys, GradientMode mode, ColorSpace colorSpace, in AllocatorManager.AllocatorHandle allocatorHandle)
    Parameters
    Type Name Description
    NativeGradient nativeGradient
    NativeArray<NativeGradientColorKey> colorKeys
    NativeArray<GradientAlphaKey> alphaKeys
    GradientMode mode
    ColorSpace colorSpace
    AllocatorManager.AllocatorHandle allocatorHandle

    Create(out NativeGradient, in Gradient, AllocatorHandle)

    Declaration
    public static void Create(out NativeGradient nativeGradient, in Gradient unityGradient, AllocatorManager.AllocatorHandle allocatorHandle)
    Parameters
    Type Name Description
    NativeGradient nativeGradient
    Gradient unityGradient
    AllocatorManager.AllocatorHandle allocatorHandle

    Dispose()

    Declaration
    public void Dispose()

    Evaluate(float)

    Declaration
    public readonly float4 Evaluate(float time)
    Parameters
    Type Name Description
    float time
    Returns
    Type Description
    float4

    Evaluate(in float8)

    Declaration
    public readonly float8x4 Evaluate(in float8 time)
    Parameters
    Type Name Description
    float8 time
    Returns
    Type Description
    float8x4

    EvaluateBatch(in NativeArray<float>, ref NativeArray<float4>)

    Declaration
    public readonly void EvaluateBatch(in NativeArray<float> times, ref NativeArray<float4> values)
    Parameters
    Type Name Description
    NativeArray<float> times
    NativeArray<float4> values

    InitForOptimizedGradient(float)

    Declaration
    public readonly float4 InitForOptimizedGradient(float time)
    Parameters
    Type Name Description
    float time
    Returns
    Type Description
    float4

    UnsafeEvaluateBatch(float*, float4*, int)

    Declaration
    public readonly void UnsafeEvaluateBatch(float* times, float4* values, int count)
    Parameters
    Type Name Description
    float* times
    float4* values
    int count

    Implements

    IDisposable

    Extension Methods

    NativeParticleSystemGradientExtensions.ToOptimized(NativeGradient, AllocatorManager.AllocatorHandle)
    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)