Struct RectHitBox2D | Package Manager UI website
docs.unity3d.com
    Show / Hide Table of Contents

    Struct RectHitBox2D

    Describes a 2D hit box for simple picking.

    Namespace: Unity.Tiny.HitBox2D
    Syntax
    public struct RectHitBox2D : IComponentData
    Remarks

    Hit boxes can be separate from sprite rendering, but should have a transform component.

    Fields

    box

    Defines the hit-area rectangle used for picking and non-physics collision checks. Its pivot point is at coordinates 0,0.

    Declaration
    public Rect box
    Field Value
    Type Description
    Rect

    Properties

    Default

    Declaration
    public static RectHitBox2D Default { get; }
    Property Value
    Type Description
    RectHitBox2D
    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