codeAPI Reference

s&box ICameraSetup: Camera render hooks

calendar_today May 12, 2026 schedule ~1 min read person PatrickJr verified 50

Interface for camera setup hooks that allow fine-grained control over camera effects. Implement to modify the camera at specific stages of the render pipeline.

Methods

CSHARP
public interface ICameraSetup : ISceneEvent<ICameraSetup>
{
    /// Effects before viewmodel is rendered.
    void PreSetup( CameraComponent cc ) { }
    
    /// Place viewmodel at this stage.
    void Setup( CameraComponent cc ) { }
    
    /// Effects including viewmodel (screenshake, noise, etc.).
    void PostSetup( CameraComponent cc ) { }
}

Usage

Implement on components that need to modify the camera during rendering. The CameraSetup component calls these methods in order during PreRender.

  • PreSetup: Apply effects before the viewmodel (e.g., camera noise updates)
  • Setup: Place the viewmodel
  • PostSetup: Apply effects that should include the viewmodel (e.g., screenshake)
Example: EnvironmentShake implements PostSetup to apply rotation noise based on distance.

Source

Used by EnvironmentShake, CameraNoiseSystem, and camera effects.

Was this helpful?