bevyengine / bevyengine/bevy

Can't use custom trigger type with default runner

Open
#21,441 5 comments 0 reactions 0 assignees View on GitHub
A-ECS C-Bug S-Ready-For-Implementation
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 16h
Merged PRs (30d)
171

Description

## What problem does this solve or what need does it fill?
In the 0.17 update post, it said you can make custom trigger types. While technically true, because the increment_trigger_id is pub(crate) and this needs to be called for the default runner to execute a trigger, you will need to make a custom runner for them, and so it is functionally impossible to use app.add_observer() with a custom trigger type since this will use the default runner.

## What solution would you like?
make a way to call world.as_unsafe_world_cell().increment_trigger_id(); with the defered world passed to the trigger trait. So they can work with the default observer.

Contributor guide

Open the contributing guide

Research direction

Start with the custom trigger path described around app.add_observer(), the default runner, increment_trigger_id, and the deferred world passed to the trigger trait. Trace how the default observer handles custom trigger types and determine how the trigger can access the needed world operation. Done means custom triggers work with app.add_observer() without requiring a custom runner.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
game-dev
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.