docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class BlobAssetReferenceColliderExtension

    A blob asset reference collider extension. Enables casting to various collider types.

    Inheritance
    object
    BlobAssetReferenceColliderExtension
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Unity.Physics.Extensions
    Assembly: Unity.Physics.dll
    Syntax
    public static class BlobAssetReferenceColliderExtension

    Methods

    AsComponent(BlobAssetReference<Collider>)

    Get a PhysicsComponent instance containing this BlobAssetReference<Collider>

    Declaration
    public static PhysicsCollider AsComponent(this BlobAssetReference<Collider> col)
    Parameters
    Type Name Description
    BlobAssetReference<Collider> col

    The BlobAssetReference<Collider> instance that we're attempting to extract data from.

    Returns
    Type Description
    PhysicsCollider

    A PhysicsComponent instance.

    AsPtr(BlobAssetReference<Collider>)

    A BlobAssetReference<Collider> extension method that converts a BlobAssetReference<Collider> to a pointer.

    Declaration
    public static Collider* AsPtr(this BlobAssetReference<Collider> col)
    Parameters
    Type Name Description
    BlobAssetReference<Collider> col

    The BlobAssetReference<Collider> to act on.

    Returns
    Type Description
    Collider*

    Null if it fails, else a pointer to a Collider.

    AsPtr<To>(BlobAssetReference<Collider>)

    Get cast pointer to the Collider inside a BlobAssetReference container.

    Declaration
    public static To* AsPtr<To>(this BlobAssetReference<Collider> col) where To : unmanaged, ICollider
    Parameters
    Type Name Description
    BlobAssetReference<Collider> col

    The BlobAssetReference<Collider> instance that we're attempting to extract data from.

    Returns
    Type Description
    To*

    A pointer to the Collider instance, cast to the specified type.

    Type Parameters
    Name Description
    To

    Type of to.

    As<To>(BlobAssetReference<Collider>)

    Get cast reference to the Collider inside a BlobAssetReference container.

    Declaration
    public static ref To As<To>(this BlobAssetReference<Collider> col) where To : unmanaged, ICollider
    Parameters
    Type Name Description
    BlobAssetReference<Collider> col

    The BlobAssetReference<Collider> instance that we're attempting to extract data from.

    Returns
    Type Description
    To

    A reference to the Collider instance, cast to the specified type.

    Type Parameters
    Name Description
    To

    Type of to.

    SetCollider(ref ColliderCastInput, BlobAssetReference<Collider>)

    Set the Collider* property of a ColliderCastInput struct, avoiding the need for an unsafe block in developer code.

    Declaration
    public static void SetCollider(this ref ColliderCastInput input, BlobAssetReference<Collider> col)
    Parameters
    Type Name Description
    ColliderCastInput input

    [in,out] The ColliderCastInput instance that needs the Collider* property set.

    BlobAssetReference<Collider> col

    The BlobAssetReference<Collider> instance that we're attempting to extract data from.

    SetCollider(ref ColliderDistanceInput, BlobAssetReference<Collider>)

    Set the Collider* property of a ColliderDistanceInput struct, avoiding the need for an unsafe block in developer code.

    Declaration
    public static void SetCollider(this ref ColliderDistanceInput input, BlobAssetReference<Collider> col)
    Parameters
    Type Name Description
    ColliderDistanceInput input

    [in,out] The ColliderDistanceInput instance that needs the Collider* property set.

    BlobAssetReference<Collider> col

    The BlobAssetReference<Collider> instance that we're attempting to extract data from.

    In This Article
    Back to top
    Copyright © 2024 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)