Trait bevy_capture::CameraTargetHeadless
source · pub trait CameraTargetHeadless {
// Required method
fn target_headless(
self,
width: u32,
height: u32,
images: &mut Assets<Image>,
) -> Self;
}Expand description
Extension trait for the camera to set the target to a headless image.
This is implemented for Camera, Camera2dBundle, and Camera3dBundle.
§Example
ⓘ
fn setup(mut commands: Commands, mut images: ResMut<Assets<Image>) {
commands.spawn(Camera2dBundle::default().target_headless(512, 512, &mut images));
}Required Methods§
Object Safety§
This trait is not object safe.