docs.unity3d.com
    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.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: Unity.Physics.Extensions
    Syntax
    public static class BlobAssetReferenceColliderExtension

    Methods

    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 : struct, 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.

    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 : struct, 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.

    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.

    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