docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct GhostDistanceImportance

    This is the default implementation of the GhostImportance API. It computes a distance-based importance scaling factor. I.e. Entities far away from a clients importance focal point (via GhostConnectionPosition) will be sent less often. Further reading: https://docs.unity3d.com/Packages/com.unity.netcode@latest/index.html?subfolder=/manual/optimizations.html#importance-scaling

    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
    [BurstCompile]
    public struct GhostDistanceImportance

    Fields

    BatchScaleFunctionPointer

    Pointer to the BatchScale(IntPtr, IntPtr, IntPtr, ref UnsafeList<PrioChunk>) static method.

    Declaration
    public static readonly PortableFunctionPointer<GhostImportance.BatchScaleImportanceDelegate> BatchScaleFunctionPointer
    Field Value
    Type Description
    PortableFunctionPointer<GhostImportance.BatchScaleImportanceDelegate>

    BatchScaleWithRelevancyFunctionPointer

    Pointer to the BatchScaleWithRelevancy(IntPtr, IntPtr, IntPtr, ref UnsafeList<PrioChunk>) static method.

    Declaration
    public static readonly PortableFunctionPointer<GhostImportance.BatchScaleImportanceDelegate> BatchScaleWithRelevancyFunctionPointer
    Field Value
    Type Description
    PortableFunctionPointer<GhostImportance.BatchScaleImportanceDelegate>

    ScaleFunctionPointer

    Pointer to the CalculateDefaultScaledPriority(int, in GhostDistancePartitionShared, in int3) static method.

    Declaration
    public static readonly PortableFunctionPointer<GhostImportance.ScaleImportanceDelegate> ScaleFunctionPointer
    Field Value
    Type Description
    PortableFunctionPointer<GhostImportance.ScaleImportanceDelegate>

    Methods

    CalculateDefaultScaledPriority(int, in GhostDistancePartitionShared, in int3)

    Default implementation of the distance scaling function.

    Declaration
    public static int CalculateDefaultScaledPriority(int priority, in GhostDistancePartitionShared chunkTile, in int3 centerTile)
    Parameters
    Type Name Description
    int priority

    The base priority

    GhostDistancePartitionShared chunkTile

    The chunk tile

    int3 centerTile

    The center tile

    Returns
    Type Description
    int

    The resulting priority

    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)