Skip to content

Conversation

@taranasus
Copy link
Contributor

Summary

Adds a configurable WindowlessFrameRate setting that allows users to control CEF's rendering framerate from 1-60 FPS (default 30). This enables smoother video playback when needed, while keeping the conservative default for CPU efficiency.

Changes

  • LaunchArguments.cs: Added WindowlessFrameRate property
  • LaunchArgumentsParser.cs: Added -windowless-frame-rate command line option (default: 30)
  • LaunchArgumentsBinder.cs: Added binding for the new option
  • CefEngineControlsManager.cs: Applied framerate setting to CefBrowserSettings.WindowlessFrameRate with clamping to valid range (1-60)
  • WebBrowserClient.cs: Added Unity Inspector field with [Range(1, 60)] slider under new "Performance" header

Usage

In Unity Inspector, the WebBrowserClient component now shows a "Performance" section with a "Windowless Frame Rate" slider. Users can set values from 1-60 FPS depending on their needs:

  • 30 FPS (default): Good balance for most web content
  • 60 FPS: Smoother video playback, higher CPU usage

Test Plan

  • Built CEF engine for macOS arm64
  • Verified engine accepts -windowless-frame-rate argument via --help
  • Tested in Unity project - Inspector shows new Performance section with framerate slider
  • Confirmed argument is passed from Unity to engine process

- Add windowless-frame-rate launch argument (1-60, default 30)
- Expose windowlessFrameRate in WebBrowserClient for Unity Inspector
- Clamp values to valid CEF range (1-60)
- Add debug logging for framerate setting

This allows users to increase browser rendering framerate up to 60 FPS
for smoother video playback when needed.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@taranasus
Copy link
Contributor Author

Hi @Voltstro ,

I'd love to use this feature in my game, but since it requires rebuilding the engine for all platforms (Mac, Windows, Linux), I can't easily test/deploy it from my fork. Any idea when the next release might be, and if this could make it in?

Thanks! Justin

Copy link
Member

@Voltstro Voltstro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the contribution! I will try to get a new UWB release out in the next week or so.

@Voltstro Voltstro merged commit 35efa86 into Voltstro-Studios:master Jan 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants