bevyengine / bevyengine/bevy

Borders of `MaterialNodeBundle` are vanished

Open
#14,254 0 comments 0 reactions 0 assignees View on GitHub
A-Rendering A-UI C-Bug S-Needs-Investigation
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 22h
Merged PRs (30d)
161

Description

## Bevy version

v0.14

## What you did

```rust
#[derive(Asset, AsBindGroup, TypePath, Debug, Clone)]
pub struct HealthBarMaterial { ... }

impl UiMaterial for HealthBarMaterial {}
```
```rust
pub fn health_bar() -> Style {
Style {
position_type: PositionType::Absolute,
align_self: AlignSelf::Start,
justify_self: JustifySelf::Start,
align_items: AlignItems::Center,
justify_content: JustifyContent::Center,
border: UiRect::all(Val::Percent(0.30)),
width: Val::Percent(15.00),
height: Val::Percent(5.00),
top: Val::Percent(4.00),
left: Val::Percent(1.50),
..default()
}
}
```
```rust
parent
.spawn((
Name::new("Health Bar"),
HudHealthBar,
MaterialNodeBundle {
style: styles::health_bar(),
material: health_bar_materials.add(HealthBarMaterial::default()),
..default()
},
BorderColor(Color::srgb(0.00, 0.00, 0.00)),
))
```

## What went wrong

In v0.13, it looked like this:
{5841C626-23D7-4AE0-A802-83D546DD9562}

But in v0.14, the same code looks like this:
{7478839D-BCD2-4A7B-9422-5FCA13036EBD}

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.