docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct GhostDebugMeshBounds

    Self contained component to hold a mesh's bounds for debug drawing.

    Implements
    IComponentData
    IQueryTypeParameter
    Inherited Members
    ValueType.Equals(object)
    ValueType.GetHashCode()
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: Unity.NetCode
    Assembly: Unity.NetCode.dll
    Syntax
    public struct GhostDebugMeshBounds : IComponentData, IQueryTypeParameter
    Remarks

    This should stay active even when the GameObject is inactive. This is really showing boxes for the netcode of your GameObject, which is linked to the entity lifecycle If the entity is still moving and your GO is inactive, you'd potentially still want to know about it.

    Fields

    GlobalBounds

    The bounds for this entity, used to draw a debug box. Should be in local space, with the center at the object's origin.

    Declaration
    public Bounds GlobalBounds
    Field Value
    Type Description
    Bounds

    Methods

    Initialize(GameObject, Entity, World)

    Convenience method to initialize the debug mesh bounds for GameObjects.

    Declaration
    public GhostDebugMeshBounds Initialize(GameObject gameObject, Entity entity, World world)
    Parameters
    Type Name Description
    GameObject gameObject

    GameObject with debug mesh

    Entity entity

    Entity represenation of gameobject

    World world

    World containing entity

    Returns
    Type Description
    GhostDebugMeshBounds

    Returns a mesh's bounds for debug drawing.

    Implements

    Unity.Entities.IComponentData
    Unity.Entities.IQueryTypeParameter
    In This Article
    Back to top
    Copyright © 2025 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)