Skip to content

Game.Notifications.NotificationsUtils

Assembly:
Assembly-CSharp.dll (game assembly)

Namespace:
Game.Notifications

Type:
public static class

Base:
System.Object (static classes implicitly inherit from object)

Summary:
Utility helpers for notification icons used by the game's notification system. Provides a constant that controls visibility distance for icons and a helper to construct an icon layer mask from an IconClusterLayer value. These utilities are lightweight, stateless and intended for use by notification rendering and clustering logic.


Fields

  • public const float ICON_VISIBLE_THROUGH_DISTANCE = 100f
    Defines the distance (game units, typically meters) at which notification icons are considered visible through geometry. Used by rendering/visibility checks to determine whether an icon should be drawn when behind or through obstacles. The value is 100.0f by default.

Properties

  • None. This static utility class exposes no properties.

Constructors

  • None. As a static class, NotificationsUtils cannot be instantiated and has no instance constructors.

Methods

  • public static IconLayerMask GetIconLayerMask(IconClusterLayer layer)
    Returns an IconLayerMask with the bit for the provided IconClusterLayer set. Implementation uses a bit shift: (IconLayerMask)(1 << (int)layer). This is a convenience helper to convert a single IconClusterLayer enum value into the corresponding bitmask used by icon filtering/visibility logic.

Remarks: - This method assumes IconClusterLayer values fit within the bits of an integer mask. No range validation is performed, so passing unusually large enum values could produce unexpected masks. - IconLayerMask is expected to be an integral bitfield enum type that represents one or more icon layers.

Usage Example

// Read the configured visibility distance:
float visibleDistance = NotificationsUtils.ICON_VISIBLE_THROUGH_DISTANCE;

// Build a mask for a single icon cluster layer:
IconLayerMask mask = NotificationsUtils.GetIconLayerMask(IconClusterLayer.MyLayer);

// Use the mask in filtering/visibility checks (example):
if ((currentLayerMask & mask) != 0)
{
    // layer matches — handle icon visibility/rendering
}