bevyengine / bevyengine/bevy

Conflict between Text and UiImage components when a ui node has both

Open
#6,835 1 comment 0 reactions 0 assignees View on GitHub
A-UI C-Bug
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 22h
Merged PRs (30d)
161

Description

## Bevy version

Bevy 0.9

## What went wrong

If you add both the image and text components to a UI node you get a mess:

![Capture_text_images](https://user-images.githubusercontent.com/27962798/205437530-91ce667d-2aed-479f-9020-fb9939c714c3.PNG)

Until archetype invariants can be enforced (#5121), users can't be prevented from adding both components.

It's natural for a user who wants to add a caption to an image to naively add text components to an ImageBundle and sometimes it will work.

## What solution would you like?

I think only drawing the text, and emitting a warning explaining why the image isn't shown is probably the best that can be done for now.

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.