Knowledge base
Knowledge base
1. DIRECT REFERENCE (tightest coupling): Get reference → CastTo<BP_Other> → call function. Use when: actor A always knows about actor B (e.g. Player → HUD).
2. CAST via GetAllActorsOfClass (loose): find → cast → call. Use when: you need to find actors dynamically.
3. EVENT DISPATCHER (loose): Owner calls dispatcher → listeners receive event. Use when: one actor notifies many others (e.g. death notification).
4. BLUEPRINT INTERFACE (loosest): Call interface message → any implementing actor responds. Use when: multiple different actor types should respond to same action (e.g. 'Interact').
5. GAME INSTANCE (persistent): Store shared data in GameInstance → GetGameInstance → Cast. Use when: data must survive level loads.