tag

#wrong-approach

8 items (8 fixes)

fixes
26.07.08e
"Building a draggable slider with click-to-jump and drag-to-scrub"

No native drag helper exists for PanelComponent sliders. Use the engine's SliderControl pattern: MousePanelEvent.LocalPosition over track width, with pointer-events routing.

26.07.08e
"Engine ships built-in McpTool source as readable C#: read it before writing your own"

The engine ships its built-in [McpTool]s as full C# source, not compiled DLLs: check addons/tools/Code/Mcp/*.cs for canonical patterns before inventing your own.

26.07.15a
"For runtime per-surface color, bake a texture: don't rely on complex.shader vertex color"

complex.shader has no shipped source and no evidence it reads vertex color as albedo, so don't plan per-vertex color painting through it. The reliable runtime color-per-surface lane is a baked texture plus Material.CreateCopy and Set("Color", tex).

26.07.22
"FrameStats and PerformanceStats are accessible from game code: no engine benchmark system needed"

Sandbox.Diagnostics.FrameStats and PerformanceStats are whitelist-clean and reachable from game-assembly components: build a relative perf probe without any engine benchmark API. Raw GC.GetAllocatedBytesForCurrentThread/GC.CollectionCount are SB1000-blocked in-editor; use PerformanceStats instead.

26.07.08e
"Gamepad triggers have a public analog read: Input.GetAnalog works"

Gamepad triggers DO have a public smooth 0..1 analog read via Input.GetAnalog(InputAnalog.LeftTrigger/RightTrigger). Named Input.config actions bound to triggers remain digital-only (on/off): use the direct analog surface for proportional control.

26.07.08e
"Runtime textures for UI panels must be assigned from C#"

SCSS background-image only resolves asset paths. Runtime Texture objects must be assigned via Panel.Style.BackgroundImage in OnTreeBuilt.

26.07.08e
"s&box ships a headless dedicated server that can run an unpublished local project"

App 1892930 via SteamCMD runs a headless server with +game pointing at a local .sbproj: clients stream code/assets, no sbox.game publish required.

26.07.08e
"Sequence-only rig: land hands on a moved prop by reseating the visual, not IK"

When a clip already poses hands in a grip and the prop moves/rescales, offset the rendered visual child instead of using IK or SetBoneTransform -- sequence-only rigs have no AnimGraph.

Want to know when new guides or fixes drop? Join the community to help build this out. Report gotchas, flag outdated fixes, or just lurk.

Join the Discord