Skip to content

Add headless renderer #3155

Closed
Closed
@Shatur

Description

@Shatur

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

When creating multiplayer, often the logic of the game is executed on the headless server. But registration of renderer types such as Asset<Meshes> is now tied to the renderer. Therefore, to use exactly the same logic on the server, I have to add compile-time checks:

    pub fn spawn(
        commands: &mut Commands,
        transform: Transform,
        #[cfg(not(feature = "headless"))] meshes: &mut Assets<Mesh>,
        #[cfg(not(feature = "headless"))] materials: &mut Assets<StandardMaterial>,
    ) -> Self {
    // ...
    }

This looks ugly and very inconvenient to use.

What solution would you like?

It would be great to have a headless renderer.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-RenderingDrawing game state to the screenC-UsabilityA targeted quality-of-life change that makes Bevy easier to use

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions