codeAPI Reference
s&box PostProcessManager: Post-processing resource management
PostProcessManager API Reference
PostProcessManager is a GameObjectSystem that manages post-processing resources with preview, toggle, and camera attachment.
Type Signature
CSHARP
public sealed class PostProcessManager : GameObjectSystem<PostProcessManager>Key Methods
- void Select(string resourcePath) - Select a post-processing resource (spawns disabled if not already active).
- void Preview(string resourcePath) - Temporarily enable a resource for preview. Automatically disables when previewing another or calling Unpreview().
- void Unpreview() - Disable the currently previewed resource.
- void Deselect() - Clear the selected resource.
- void Toggle(string resourcePath) - Toggle a resource on/off.
- void Set(string resourcePath, bool state) - Set a resource to a specific enabled state.
- void Remove(string resourcePath) - Remove a resource from the scene.
- bool IsEnabled(string resourcePath) - Check if a resource is currently enabled.
- IReadOnlyList<Component> GetComponents(string resourcePath) - Get all components from a spawned resource.
- IReadOnlyList<Component> GetSelectedComponents() - Get components from the selected resource.
Properties
- string SelectedPath - The currently selected resource path.
Notes
- Resources are spawned as children of the scene camera with GameObjectFlags.NotNetworked.
- Resources are spawned enabled first (for initialization) then disabled if not wanted.
- Preview mode temporarily enables resources without affecting the permanent enabled state.
- Multiple resources can be active simultaneously.
Was this helpful?