Namespace Serenity.Feedback.Infrastructure.Components
Classes
UiShakeRegistry
Process-wide registry of active UnityUiShakeReceivers, read by the screen-shake channel.
UnityCameraShakeApplier
Applies the screen-shake offset to a camera in a way that survives a camera controller. A follow / gameplay camera sets its own position every frame, which would overwrite a shake written earlier in the frame. This component runs with a very late execution order (after typical controllers) and, each LateUpdate, removes its previous offset (so the controller's value becomes the base) then re-applies the current offset additively. That makes shake work whether or not a controller drives the camera, and never drifts.
The screen-shake channel adds this automatically to the camera it shakes and feeds it the offset.
UnityUiShakeReceiver
Marks UI as something that shakes when a screen-shake effect with "Include UI" enabled plays. Drop it on a UI container (a menu root, HUD, or the Canvas itself) and the screen-shake channel drives it each frame, resetting it when the shake ends.
Render-mode aware: a ScreenSpaceOverlay canvas ignores cameras AND has its root transform driven by
Unity, so when this sits on a root Canvas it shakes the canvas's CHILDREN instead of the (immovable)
root. It re-reads the current children every frame, so content that changes mid-shake (e.g. the menu
being replaced by the gameplay HUD on a scene change) keeps shaking. On any other RectTransform it
shakes itself. Either way it offsets anchoredPosition, which moves UI in every render mode.