bevyengine / bevyengine/bevy

Allow transmitting assets over BRP

Open
#19,709 0 comments 0 reactions 0 assignees View on GitHub
A-Assets A-Editor C-Feature D-Modest
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 22h
Merged PRs (30d)
161

Description

## What problem does this solve or what need does it fill?

Alternative to https://github.com/bevyengine/bevy/issues/19695
Basically, we need a way to let two processes access the same assets for e.g. editors that want to attach to a running game

## What solution would you like?

Quoting @mockersf on [Discord]()
> do something like brp.server_load("my_path.file") and it returns the bytes that you can load on the brp client side
> then you have an asset source that is brp:// and that actually reads the file in the server and sends the bytes to the client

> again, not sure if that would work, but:
> - client does `asset_server.load("brp://my_path.file")`
> - this gets translated to `brp.server_load("my_path.file")`, still on the client
> - this sends a command to the server to load a file
> - server does `asset_server.load("my_path.file")`
> - but not actually a load as we don't want the loaded asset on the server, just for it to setup the reader with the asset bytes
> - the server sends the bytes over brp to the client
> - client starts the asset loader on this reader

## What alternative(s) have you considered?

Other solutions to solve and/or work around the problem presented.

## Additional context

Open up the full asset path

Contributor guide

Open the contributing guide

Research direction

The issue names no files or tests; begin by tracing the existing BRP commands and the asset_server load path. Compare the proposed brp:// flow, including server_load and transmitting asset bytes, with the current behavior. Done means two processes can access the same asset through BRP, with the client starting its asset loader from the received bytes.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
backend-api-design, game-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.