UMageItWorldMarkersSubsystem
Base Class: ULocalPlayerSubsystem
Interfaces: FTickableGameObject
Overview
Section titled “Overview”UMageItWorldMarkersSubsystem is the core management system for handling 3D world markers projected onto the 2D screen. Being a ULocalPlayerSubsystem, it is automatically instantiated per local player, making it highly efficient and easy to access without manual initialization.
It handles marker registration, dynamic visibility testing (with performance-friendly chunking), crosshair interaction, and screen edge behavior.
How to Access
Section titled “How to Access”In Blueprints
Section titled “In Blueprints”Right-click anywhere in an Event Graph and search for Get MageItWorldMarkersSubsystem.
In C++
Section titled “In C++”To access the subsystem in C++, get the local player from the player controller:
if (APlayerController* PC = GetWorld()->GetFirstPlayerController()){ if (ULocalPlayer* LocalPlayer = PC->GetLocalPlayer()) { UMageItWorldMarkersSubsystem* MarkerSubsystem = LocalPlayer->GetSubsystem<UMageItWorldMarkersSubsystem>(); }}Properties (Variables)
Section titled “Properties (Variables)”Optimization & Rendering
Section titled “Optimization & Rendering”bVisibilityTestEnabled(Boolean): Toggles distance-based visibility checks for markers.MarkerVisibilityTestChunkSize(Integer): Determines how many markers are tested for visibility per frame. Default is10. Set to0to disable chunked testing.ScreenEdgeGap(FMargin): The padding/margin from the edge of the screen where markers will clamp when the target object is off-screen.CachedViewportSize(FVector2D): Read-only property storing current viewport dimensions.CachedSafeZone(FMargin): Read-only property storing the current platform safe-zone margin.
Crosshair & Interaction
Section titled “Crosshair & Interaction”bCrosshairInteractionEnabled(Boolean): Enables or disables logic for markers reacting when the player aims at them.CrosshairInteractionRadius(Float): The screen-space radius (in UI units) around the crosshair where a marker is considered “hovered”.FocusRadius(Float): A secondary radius used for highlighting or focusing markers near the center of the screen.MarkerUnderCrosshair(UMageItWorldMarkerComponent*): Read-only reference to the specific marker currently targeted by the player.
Methods (Functions)
Section titled “Methods (Functions)”Marker Management
Section titled “Marker Management”RegisterMarker(UMageItWorldMarkerComponent* MarkerComponent)-> void
Registers a new marker with the subsystem. Typically called automatically onBeginPlaybyUMageItWorldMarkerComponent.UnregisterMarker(UMageItWorldMarkerComponent* MarkerComponent)-> void
Removes the marker from tracking. Automatically called onEndPlayor destruction of the component.
Queries & Arrays
Section titled “Queries & Arrays”GetRegisteredMarkers()-> TArray<UMageItWorldMarkerComponent*>
Returns an array of all markers currently tracked by the subsystem, regardless of visibility.GetVisibleMarkers()-> TArray<UMageItWorldMarkerComponent*>
Returns an array of markers that are currently visible on the screen.GetConditionalVisibilityMarkers()-> TArray<UMageItWorldMarkerComponent*>
Returns markers that have dynamic visibility conditions applied.
Setters (Blueprint Callable)
Section titled “Setters (Blueprint Callable)”SetCrosshairInteractionRadius(float NewRadius)-> void
Updates the interaction radius dynamically at runtime (useful for weapon switching or zooming).SetFocusRadius(float NewRadius)-> void
Updates the focus detection radius dynamically.UpdateMarkerVisibility(UMageItWorldMarkerComponent* MarkerComponent, bool bVisible)-> void
Force-updates the visibility state of a specific marker, bypassing chunked visibility checks.