Skip to content

feat: add ForgeBridgeServer named pipe IPC for live skybox updates#116

Open
TimMasalme wants to merge 1 commit into
FAForever:masterfrom
TimMasalme:forge-bridge-server
Open

feat: add ForgeBridgeServer named pipe IPC for live skybox updates#116
TimMasalme wants to merge 1 commit into
FAForever:masterfrom
TimMasalme:forge-bridge-server

Conversation

@TimMasalme

Copy link
Copy Markdown

Summary

Adds ForgeBridgeServer.cs, a MonoBehaviour that opens a named pipe
(ForgeMapToolkit.EditorBridge) and receives live skybox snapshots from
ForgeMapToolkit, applying them instantly in the editor without manual
export/import.

How it works

  • Background thread runs an accept loop; each connection starts a
    length-prefixed read loop (4-byte LE uint32 + UTF-8 JSON body, 1 MB cap)
  • On connect, a handshake verifies that the Toolkit's mapName matches
    MapLuaParser.Current.FolderName — responds with handshake.response
    and optional map.mismatch
  • Valid skybox.snapshot messages are queued (ConcurrentQueue) and
    drained on the Unity main thread in Update() via ApplyPatch(),
    which writes into AdditionalSkyboxData.Data and calls LoadSkybox()
  • Accept loop reopens the pipe after each disconnect — no Editor restart
    needed

Setup / Build notes

  1. ForgeBridgeServer is attached to the OzoneMapEditor GameObject in
    the MapEditor scene (included in Assets/MapEditor.unity)
  2. Run In Background must be enabled — set in Project Settings → Player
    → Resolution and Presentation. Without this, Update() is throttled
    when the Editor window loses focus and live updates stall.
    This change is included in ProjectSettings/ProjectSettings.asset.

Notes

  • The original design called for a PipeSecurity ACL restricting pipe
    access to the current Windows user. Unity's Mono runtime throws
    NotImplementedException on that constructor overload at runtime, so
    the basic constructor is used instead. Both ends run under the same
    local user session, so this is acceptable.
  • This is the Editor-side companion to editor-bridge.js in the
    ForgeMapToolkit repo (currently private-repo)

@coderabbitai

coderabbitai Bot commented Jun 19, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@TimMasalme, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 37 minutes and 36 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b4bda13c-3322-496d-9d0c-5378d891b5f6

📥 Commits

Reviewing files that changed from the base of the PR and between 9e372a1 and 40b9a8a.

⛔ Files ignored due to path filters (2)
  • Assets/MapEditor.unity is excluded by !**/*.unity
  • ProjectSettings/ProjectSettings.asset is excluded by !**/*.asset
📒 Files selected for processing (2)
  • Assets/Scripts/Ozone SCMAP Code/ForgeBridgeServer.cs
  • Assets/Scripts/Ozone SCMAP Code/ForgeBridgeServer.cs.meta
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

1 participant