File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 11//! Example for RapierContext serialization, run with `--features serde-serialize`.
22
33use bevy:: prelude:: * ;
4+ use bevy:: MinimalPlugins ;
45use bevy_rapier2d:: prelude:: * ;
56
67/// Note: This will end up in duplication for testbed, but that's more simple.
@@ -14,24 +15,23 @@ fn main() {
1415 0xFF as f32 / 255.0 ,
1516 ) ) )
1617 . add_plugins ( (
17- DefaultPlugins ,
18+ MinimalPlugins ,
1819 RapierPhysicsPlugin :: < NoUserData > :: pixels_per_meter ( 100.0 ) ,
19- RapierDebugRenderPlugin :: default ( ) ,
2020 ) )
21- . add_systems ( Startup , ( joints2:: setup_graphics , joints2 :: setup_physics) )
21+ . add_systems ( Startup , joints2:: setup_physics)
2222 . add_systems ( PostUpdate , print_physics)
2323 . add_systems ( Last , quit)
2424 . run ( ) ;
2525}
2626
2727pub fn print_physics ( context : Res < RapierContext > ) {
2828 #[ cfg( feature = "serde-serialize" ) ]
29- info ! (
29+ println ! (
3030 "{}" ,
3131 serde_json:: to_string_pretty( & ( * context) ) . expect( "Unable to serialize `RapierContext`" )
3232 ) ;
3333 #[ cfg( not( feature = "serde-serialize" ) ) ]
34- error ! ( "Example 'serialization' should be run with '--features serde-serialize'." ) ;
34+ panic ! ( "Example 'serialization' should be run with '--features serde-serialize'." ) ;
3535}
3636
3737fn quit ( mut exit_event : EventWriter < AppExit > ) {
You can’t perform that action at this time.
0 commit comments