Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI not working #82

Open
fhgaha opened this issue Oct 25, 2024 · 1 comment
Open

UI not working #82

fhgaha opened this issue Oct 25, 2024 · 1 comment

Comments

@fhgaha
Copy link

fhgaha commented Oct 25, 2024

water_slides_EYO3NPbdia.mp4

Hello I was following Bevy Lunex Book quick start guide and that's what I see (the green and yellow frames). What am I doing wrong here?

Also the book says I must have ui as children of my camera but the example just uses commands.spawn(). What is correct?

Oh and I use pan orbit camera plugin, maybe that has something to do with it.

    commands
        .spawn((
            SourceFromCamera,
            UiTreeBundle::<MainUi>::from(UiTree::new2d("Hello UI!"))
        ))
        .with_children(|ui|{
            
            //ui nodes
            
            ui.spawn((
                UiLink::<MainUi>::path("Root"),
                UiLayout::window_full().pos(Ab(20.)).size(Rl(100.) - Ab(40.)).pack::<Base>(), 
            ));

            ui.spawn((
                UiLink::<MainUi>::path("Root/Rectangle"),
                UiLayout::solid().size(Ab((1920., 1080.))).pack::<Base>(),
                UiImage2dBundle::from(assets.load("textures/Sample.png")),
            ));
        });
> Hello UI! == Window [pos: (x: 0, y: 0) size: (x: 100%, y: 100%) anchor: TopLeft] |  ||| Computed [pos: [0, 0, 0] size: [800, 600]]
  |-> Root == Window [pos: (x: 20, y: 20) size: (x: -40 + 100%, y: -40 + 100%) anchor: TopLeft] |  ||| Computed [pos: [20, 20, 1] size: [760, 560]]
  |    |-> Rectangle == Solid [size: (x: 1920, y: 1080) align_x: 0 align_y: 0] |  ||| Computed [pos: [20, 86.25, 2] size: [760, 427.5]]
@Amatsugu
Copy link

I have the same issue, even 3d UI doesn't render anything (other than the debug outlines).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants