docs.unity3d.com
    目次を表示する/隠す

    Method GetOrCreate

    GetOrCreate<TContext>(UInt32)

    Creates a shared static data for the specified context (usable from both C# and HPC#)

    Declaration
    public static SharedStatic<T> GetOrCreate<TContext>(uint alignment = 0U)
    Parameters
    Type Name Description
    UInt32 alignment

    Optional alignment

    Returns
    Type Description
    SharedStatic<T>

    A shared static for the specified context

    Type Parameters
    Name Description
    TContext

    A type class that uniquely identifies the this shared data.

    GetOrCreate<TContext, TSubContext>(UInt32)

    Creates a shared static data for the specified context and sub-context (usable from both C# and HPC#)

    Declaration
    public static SharedStatic<T> GetOrCreate<TContext, TSubContext>(uint alignment = 0U)
    Parameters
    Type Name Description
    UInt32 alignment

    Optional alignment

    Returns
    Type Description
    SharedStatic<T>

    A shared static for the specified context

    Type Parameters
    Name Description
    TContext

    A type class that uniquely identifies the this shared data.

    TSubContext

    A type class that uniquely identifies this shared data within a sub-context of the primary context

    GetOrCreate(Type, UInt32)

    Creates a shared static data for the specified context (reflection based, only usable from C#, but not from HPC#)

    Declaration
    public static SharedStatic<T> GetOrCreate(Type contextType, uint alignment = 0U)
    Parameters
    Type Name Description
    Type contextType

    A type class that uniquely identifies the this shared data

    UInt32 alignment

    Optional alignment

    Returns
    Type Description
    SharedStatic<T>

    A shared static for the specified context

    GetOrCreate(Type, Type, UInt32)

    Creates a shared static data for the specified context and sub-context (usable from both C# and HPC#)

    Declaration
    public static SharedStatic<T> GetOrCreate(Type contextType, Type subContextType, uint alignment = 0U)
    Parameters
    Type Name Description
    Type contextType

    A type class that uniquely identifies the this shared data

    Type subContextType

    A type class that uniquely identifies this shared data within a sub-context of the primary context

    UInt32 alignment

    Optional alignment

    Returns
    Type Description
    SharedStatic<T>

    A shared static for the specified context

    トップに戻る
    Copyright © 2023 Unity Technologies — 商標と利用規約
    • 法律関連
    • プライバシーポリシー
    • クッキー
    • 私の個人情報を販売または共有しない
    • Your Privacy Choices (Cookie Settings)