Struct FunctionPointer<T> | Burst | 1.3.9
docs.unity.cn
    Show / Hide Table of Contents

    Struct FunctionPointer<T>

    A function pointer that can be used from a Burst Job or from regular C#. It needs to be compiled through Unity.Burst.BurstCompiler.CompileFunctionPointer``1(``0)

    Inherited Members
    ValueType.Equals(Object)
    ValueType.GetHashCode()
    ValueType.ToString()
    Object.Equals(Object, Object)
    Object.GetType()
    Object.ReferenceEquals(Object, Object)
    Namespace: Unity.Burst
    Syntax
    public struct FunctionPointer<T> : IFunctionPointer
    Type Parameters
    Name Description
    T

    Type of the delegate of this function pointer

    Constructors

    FunctionPointer(IntPtr)

    Creates a new instance of this function pointer with the following native pointer.

    Declaration
    public FunctionPointer(IntPtr ptr)
    Parameters
    Type Name Description
    IntPtr ptr

    Properties

    Invoke

    Gets the delegate associated to this function pointer in order to call the function pointer. This delegate can be called from a Burst Job or from regular C#. If calling from regular C#, it is recommended to cache the returned delegate of this property instead of using this property every time you need to call the delegate.

    Declaration
    public T Invoke { get; }
    Property Value
    Type Description
    T

    IsCreated

    Whether the function pointer is valid.

    Declaration
    public bool IsCreated { get; }
    Property Value
    Type Description
    Boolean

    Value

    Gets the underlying pointer.

    Declaration
    public IntPtr Value { get; }
    Property Value
    Type Description
    IntPtr

    Explicit Interface Implementations

    IFunctionPointer.FromIntPtr(IntPtr)

    Declaration
    IFunctionPointer IFunctionPointer.FromIntPtr(IntPtr ptr)
    Parameters
    Type Name Description
    IntPtr ptr
    Returns
    Type Description
    IFunctionPointer
    Implements
    IFunctionPointer.FromIntPtr(IntPtr)
    Back to top Copyright © 2020 Unity Technologies
    Generated by DocFX
    on Thursday, October 8, 2020