Skip to content

ui_material example should show how to use Globals #16829

@rparrett

Description

@rparrett

How can Bevy's documentation be improved?

It's easy for a user to get tripped up by using the wrong globals import, e.g. from bevy_pbr. We don't seem to show the correct import anywhere in our docs or examples.

Something like

#import bevy_render::globals::Globals

@group(0) @binding(1) var<uniform> globals: Globals;

// globals.time

Seems to work, but I'm not 100% sure if this is the canonical way to do it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-RenderingDrawing game state to the screenC-DocsAn addition or correction to our documentationC-ExamplesAn addition or correction to our examplesD-StraightforwardSimple bug fixes and API improvements, docs, test and examplesS-Ready-For-ImplementationThis issue is ready for an implementation PR. Go for it!

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions