bevyengine / bevyengine/bevy

Add Param type to ExtractInstance trait

Open
#10,750 0 comments 0 reactions 0 assignees View on GitHub
A-Rendering C-Usability
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 22h
Merged PRs (30d)
161

Description

## What problem does this solve or what need does it fill?

Using resource/main world to extract instances with [`ExtractInstancesPlugin`](https://docs.rs/bevy_render/0.12.0/bevy_render/extract_instances/struct.ExtractInstancesPlugin.html).

## What solution would you like?

Add `Param` associated type to [`ExtractInstance`](https://docs.rs/bevy_render/0.12.0/bevy_render/extract_instances/trait.ExtractInstance.html) trait, similar to [`RenderCommand`](https://docs.rs/bevy_render/0.12.0/bevy_render/render_phase/trait.RenderCommand.html) trait.

## What alternative(s) have you considered?

Duplicate the work done by [`ExtractInstancesPlugin`](https://docs.rs/bevy_render/0.12.0/bevy_render/extract_instances/struct.ExtractInstancesPlugin.html) and use your own extract system, similar to what [`extract_sprites`](https://github.com/bevyengine/bevy/blob/89d652ba3a9ec03f40cc780179812da54fbe0a1b/crates/bevy_sprite/src/render/mod.rs#L354-L436) does.

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.