File tree Expand file tree Collapse file tree 1 file changed +11
-8
lines changed
crates/bevy_mod_scripting_core/src Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -233,14 +233,17 @@ impl<P: IntoScriptPluginParams> Command for CreateOrUpdateScript<P> {
233
233
reload_state = Some ( state) ;
234
234
}
235
235
Err ( err) => {
236
- handle_script_errors (
237
- guard. clone ( ) ,
238
- vec ! [ err
239
- . with_script( self . id. clone( ) )
240
- . with_context( P :: LANGUAGE )
241
- . with_context( "saving reload state" ) ]
242
- . into_iter ( ) ,
243
- ) ;
236
+ let missing_script = err. downcast_interop_inner ( ) . map ( |e| matches ! ( e, crate :: error:: InteropErrorInner :: MissingScript { .. } ) ) . unwrap_or ( false ) ;
237
+ if !missing_script {
238
+ handle_script_errors (
239
+ guard. clone ( ) ,
240
+ vec ! [ err
241
+ . with_script( self . id. clone( ) )
242
+ . with_context( P :: LANGUAGE )
243
+ . with_context( "saving reload state" ) ]
244
+ . into_iter ( ) ,
245
+ ) ;
246
+ }
244
247
}
245
248
}
246
249
bevy:: log:: debug!( "{}: loading script with id: {}" , P :: LANGUAGE , self . id) ;
You can’t perform that action at this time.
0 commit comments