#bevy_editor_pls

79 messages · Page 1 of 1 (latest)

golden socket
young sigil
#

I am using bevy_editor_pls in my project whenever I go into editor view where I can move the camera around, I get this error.

thread 'main' panicked at 'index out of bounds: the len is 726 but the index is 726', E:\rust\.cargo\registry\src\github.com-1ecc6299db9ec823\bevy_mod_raycast-0.7.0\src\lib.rs:655:29

It doesn't happen straight away and the higher the value of len is (in that error 726) the longer it takes before panicing.
I am generating a mesh though code and believe that it's the cause of the issue. The following is an example mesh (it's generated randomly each time).

young sigil
young sigil
sand elk
young sigil
#

🤦‍♂️ yes. 154 vertices and the highest index is 155

young sigil
#

What are these warnings I get every time on startup and how can I stop them?

WARN bevy_ecs::schedule::graph_utils: bevy_editor_pls_default_windows::debug_settings::fake_time::pause_time wants to be after unknown label: TimeSystem
WARN bevy_ecs::schedule::graph_utils: bevy_editor_pls_core::editor::Editor::system wants to be before unknown label: EguiSystem::ProcessOutput
unique rock
#

messed up when I was bumping to 0.19 and missed one bevy_egui declaration

#

also now I have noticed that the picking still somewhat goes through the editor in weird cases

#

it seems fine when you click in any place with a scroll bar, but just docked menus its doesn't seem happy

#

going to look a bit deeper at that

#

prob a bug in how egui_dock handles inputs

unique rock
#

this is an annoyingly deep issue with egui_dock

#

going to give up on it for now

unique rock
#

@sand elk would you prefer more work on bevy inspector egui esque things rather than the more monolithic bevy editor pls? just don't want to pester too much about this if you would want most of the changes in the inspector/in other external crates

#

and I'm fine either way, I'm somewhat leaning towards using inspector as a base and putting together the egui dock/etc. similar to the examples for the sake of control

sand elk
#

That way people can build their own stuff if they want the flexibility

heady fable
#

Is there anything I need to do to make the editor camera show up in the center of the window? I'm just getting gray there, it works fine if I hit play though.

sand elk
#

The camera tries to position itself like a preexisting camera if it finds one

heady fable
sand elk
#

I fixed that on main, so if you still have the issue maybe try depending on bevy_editor_pls git and see if it's fixed?

heady fable
sand elk
#

I'm not sure what caused it

#

my solution was just to not copy the camera transform if any part of it isn't finite

heady fable
#

Is the main branch compatible with bevy stable? I don't wanna do a whole big port for now ^^

sand elk
#

it is

heady fable
#

okay, might give that a shot then

main ivy
sand elk
dense basin
sand elk
silk lance
#

I'm encountering a panic when including the EditorPlugin and my systems are arranged in a certain way:

app
            .add_systems(Update, update_pointer_state_from_window.pipe(on_error))
            .add_plugins(MyPlugin);
// MyPlugin
app
            .add_systems(
                Update,
                (,
                    foo.pipe(on_error),
                    bar.pipe(on_error),
                )
                    .chain()                                         .after(update_pointer_state_from_window);
            );

Specifically it seems to crash inside of bevy_mod_debugdump:

    fn system_of_system_type(&self, system_type: TypeId) -> NodeId {
        let system_node = self
            .graph
            .systems()
            .find_map(|(node_id, system, _)| (system.type_id() == system_type).then_some(node_id))
            .unwrap();
        system_node
    }

It seems to work ok if I rearrange the schedule a bit (by moving the update_pointer_from_window system into MyPlugin.

I'll play with it a bit more to see if I can make a more helpful repro.

main ivy
#

yarn

agile kayak
#

is it correct that currently its not compatible with bevy 11?

I currently get:

missing fields `grid_auto_columns`, `grid_auto_flow`, `grid_auto_rows` and 5 other fields in initializer of `taffy::prelude::Style`
heady fable
sinful raptor
#

it seems like bevy_editor_pls is not working with kayak_ui. Previously this problem was solved by adding editor in kayak plugins in correct order, but with bevy 0.11 it does not work in any order

sinful raptor
#

is there any solution for issue with kayak_ui?

main ivy
# main ivy yarn

I just realized I fat-fingered this message somehow. Sorry for that! 😄

agile kayak
#

Does anyone else have issues with the current main branch with mouse panning (middle mouse button) and rotating (right mouse button)?

For me I currently can't rotate around, movement with WASD works as expected.

agile kayak
#

it seems to be realted to: Editor.viewport_interaction_active returning false as soon as the right mouse button is clicked.

commenting out the second part in the cameras\mod.rs

editor_cam_3d_panorbit.1.enabled = active;// && editor.viewport_interaction_active();

seems to make it work again, but not sure if that would lead to other issues 🤔

sand elk
sand elk
#

I'll check that out but anyways that should be a good enough workaround to publish a release. The only effect will be that dragging something in the UI will also move the camera

prisma estuary
#

Sorry if I missed this somewhere, but what does the UI checkbox do?

sand elk
prisma estuary
#

ahhh got it. ty!

sinful raptor
#

to add my resource in the resources tab, should it be enough to just register that resource in type_registry with register_type?

sinful raptor
#

but I don't understand what special data it might be and how to just display regular resource with it's regular data

sinful raptor
#

managed to add my resource there like this:

.register_type::<PlayerCoins>()
.register_type_data::<PlayerCoins, ReflectResource>()

but not sure I understand why exactly this needed.. What is this ReflectResource? just a way to mark resource to appear in editor or is it something more?

ebon trellis
#

time doesn't seem to stop when triggering editor or controls::Action::PauseUnpauseTime. Am I holding it wrong?

#

ah, it has to be explicitly stopped in editor -> debug settings. aforementioned action seems to be broken, then…

agile kayak
#

Does anyone else experience the camera jumping when the right mouse button is pressed in the editor?

I can reproduce it on the latest commit, when using the MacOS platform.

#

(Also could replicate it on Windows 11)

ebon trellis
#

doesn't happen to me

dusky atlas
#

The gizmos produce very odd behavior in combination with bevy_xpbd

#

picking up a cube causes it to fly off the screen

#

I don't exactly get why, but it has to do with the gizmo code

  1. using the current (not initial) transform of the object to determine the axis
  2. bevy_xpbd introducing slight constant slight deviations in orientation
#

I think this explains the off axis movement.

#

For the extreme on axis movement:
I think what is happening is xpbd is constantly increasing negative Z linvel due to gravity, eventually the single tick change in Z plus orientation errors leads to wacky behavior

#

I think the gizmos need to compute based on start position and orientation.

flint spear
#

Hi, is there a simple way to set initial camera mode for the editor (e.g. 2d) via system?

flint spear
sinful raptor
#

Hello. Any plans to update bevy_editor_pls to bevy 0.14?

heady fable
agile kayak
#

(shortform for the components: w: -> With, x: -> Without, i: -> Index of entity)

agile kayak
#

If there is interest, is there any chance it could be upstreamed?

agile kayak
unique rock
#

I'd definitely be interested in an upstreaming of that feature