public sealed class BuoyancyDebugSystemThe frame that joins water.showBuoyancy to BuoyancyDebugDraw.
As a system
- Phase
- PreRender
- Reads
- WorldTransform BuoyancyState
Remarks
The half of the sixth verb that was owed. The lines were written and tested and the verb was registered, and nothing joined them: no host copied WaterDebug.ShowBuoyancy into Enabled and no host called Draw. So the toggle set a bool that nothing consumed, in the editor's Water menu as well as the console.
⚠ Show is a delegate because the flag is in an assembly this one must not reference. WaterDebug lives in Vixen.Rendering.Water, and § D1 puts the physics join in its own assembly precisely so that nothing linking Jolt is linked by a renderer — reaching for the flag from here would drag a graphics device into the path a dedicated server runs. So a host that has both writes the join once, at registration: Show = () => WaterDebug.ShowBuoyancy. Left null, Draw's own Enabled is honoured, which is what a headless build or a test drives it with.
⚠ Read once a frame rather than subscribed to. The flag is a static a console verb writes at any moment; a system that cached it would draw one frame behind every toggle, and the frame somebody is looking at when they press the key is the one that matters.
⚠ PreRender, and both neighbours decide it. TransformSystem writes the WorldTransform the pontoons are placed from in LateUpdate, so anything earlier draws the spheres where the body was; and the accumulator is drained during Render and aged after it, so anything later draws into a frame that has already been recorded. Neither failure says anything — the picture is a lag or an empty screen.
Fields and properties (4)
public Func<bool>? ShowWhere the host's water.showBuoyancy is, or null to drive Draw directly.
public BuoyancyDebugDraw DrawThe lines themselves, so a host can change the arrow scale.
public int FramesHow many frames this has drawn into the accumulator.
public SystemAccess Access
Methods (3)
public BuoyancyDebugSystem(BuoyancySystem buoyancy, DebugDraw into)The frame that joins water.showBuoyancy to BuoyancyDebugDraw.
public override JobHandle Update(in SystemContext context, JobHandle dependency)Runs the system.
public void Step(World world)Copies the flag across and draws one frame's worth.
Used by (2)
- ArenaThirdPersonShooter
- BuoyancyDebugSystemTestsVixen.Water.Physics.Tests