Skip to content

Add a warning if WindowDescriptor is inserted after the render plugin #5884

Closed
@nicopap

Description

@nicopap

How can Bevy's documentation be improved?

To set the present_mode (aka vsync) of the bevy app, it is required that the WindowDescriptor resource be inserted before the insertion of the core bevy rendering plugin, so that it's possible to set the present mode when initializing rendering-related resources.

It is easy to mistakenly add the WindowDescriptor after the default bevy plugins. And there is absolutely no feedback telling user that they are "holding it wrong," resulting in difficult-to-understand unexpected behavior.

There should be a check on whether WindowDescriptor was inserted/updated after its useful insertion time and print a warning, explaining what problems this entails and how to fix the issue (adding the resource before the rendering plugin).

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-RenderingDrawing game state to the screenC-DocsAn addition or correction to our documentationC-UsabilityA targeted quality-of-life change that makes Bevy easier to useD-TrivialNice and easy! A great choice to get started with Bevy

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions