TargetInformer
Display UI for showing information about objects being targeted, manipulated, or built. Behavior contract (parity with GDScript TargetInformer):
- Chooses a display target by priority: Manipulation > Placement preview > Targeting.
- Coalesces multiple state changes in the same frame into exactly one deferred refresh.
- Rebuilds labels when the display target changes; otherwise updates the position label.
- Hides when mode is Off; otherwise shows. Non-goals:
- This class does not resolve targets from core services directly (core is engine-agnostic). Consumers should provide targets via SetTargets/SetTargetProviders and call NotifyStateChanged.
Project: GridPlacement v6.0
Layer: Godot
Source: plugins/gameplay/GridPlacement/cs/Godot/UI/TargetInformer.cs
Namespace: GridPlacement.Godot.UI
Kind: class
Parsing Method: AST-based (Roslyn) - NOT regex
⚠️ IMPORTANT: This documentation was generated using AST parsing, not regex.
Properties
InfoParent
Methods
_Ready
Returns: void
_ExitTree
Returns: void
SetTargetProviders
Sets provider delegates that the informer will query at refresh time.
Returns: void
Parameters:
Func<Node?>? getManipulationTargetFunc<Node?>? getPlacementPreviewTargetFunc<Node?>? getTargetingTarget
SetTargets
Convenience method for pushing direct targets (useful for simple scenes/tests).
Returns: void
Parameters:
Node? manipulationTargetNode? placementPreviewTargetNode? targetingTarget
NotifyStateChanged
Call this when any of the state sources that affect display selection have changed.
Returns: void
GetDisplayTarget
Returns the current display target based on priority.
- Manipulation (highest)
- Placement preview
- Targeting (lowest)
Returns: Node?