You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I created a rain particle effect, but I want to dynamically adjust the spawner count over time so that the rain gradually starts and stops. I attempted to implement this with the following code, but it doesn’t seem to have any effect:
fn update_effect_count(
mut effects: ResMut<Assets<EffectAsset>>,
effect_query: Query<&ParticleEffect>,
) {
for effect in effect_query.iter() {
let effect_asset = effects.get_mut(&effect.handle).unwrap();
effect_asset.spawner.set_count(1.0.into());
}
}
Could someone point out what I might be doing wrong or suggest an alternative approach?
The text was updated successfully, but these errors were encountered:
Hi there!
I created a rain particle effect, but I want to dynamically adjust the spawner count over time so that the rain gradually starts and stops. I attempted to implement this with the following code, but it doesn’t seem to have any effect:
Could someone point out what I might be doing wrong or suggest an alternative approach?
The text was updated successfully, but these errors were encountered: