Skip to content

Commit 5847b74

Browse files
committed
fix egui
1 parent d3bc0ac commit 5847b74

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

bevy_ios_iap_egui/src/lib.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use bevy::prelude::*;
2-
use bevy_egui::{egui, EguiContexts, EguiPlugin};
2+
use bevy_egui::{EguiContexts, EguiPrimaryContextPass, egui};
33
use bevy_ios_iap::{
44
IosIapEvents, IosIapProduct, IosIapProductsResponse, IosIapResponse, IosIapTransaction,
55
IosIapTransactionResponse,
@@ -32,10 +32,6 @@ pub struct IosIapEguiPlugin {
3232

3333
impl Plugin for IosIapEguiPlugin {
3434
fn build(&self, app: &mut App) {
35-
if !app.is_plugin_added::<EguiPlugin>() {
36-
app.add_plugins(EguiPlugin::default());
37-
}
38-
3935
app.init_resource::<DebugUiResource>();
4036
app.init_resource::<DebugIosIap>();
4137

@@ -44,7 +40,7 @@ impl Plugin for IosIapEguiPlugin {
4440
..default()
4541
});
4642

47-
app.add_systems(Update, update);
43+
app.add_systems(EguiPrimaryContextPass, update);
4844
app.add_systems(
4945
Update,
5046
process_iap_responses.run_if(on_message::<IosIapResponse>),

0 commit comments

Comments
 (0)