File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
crates/bevy_mod_scripting_core/src Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -183,8 +183,8 @@ pub trait ConfigureScriptPlugin {
183
183
/// Switch the context assigning strategy to a global context assigner.
184
184
///
185
185
/// This means that all scripts will share the same context. This is useful for when you want to share data between scripts easilly.
186
- /// Be careful however as this also means that scripts can interfere with each other in unexpected ways!.
187
- fn enable_context_sharing ( self ) ;
186
+ /// Be careful however as this also means that scripts can interfere with each other in unexpected ways! Including overwriting each other's handlers .
187
+ fn enable_context_sharing ( self ) -> Self ;
188
188
}
189
189
190
190
impl < P : IntoScriptPluginParams + AsMut < ScriptingPlugin < P > > > ConfigureScriptPlugin for P {
@@ -209,8 +209,9 @@ impl<P: IntoScriptPluginParams + AsMut<ScriptingPlugin<P>>> ConfigureScriptPlugi
209
209
self
210
210
}
211
211
212
- fn enable_context_sharing ( mut self ) {
212
+ fn enable_context_sharing ( mut self ) -> Self {
213
213
self . as_mut ( ) . context_assigner = ContextAssigner :: new_global_context_assigner ( ) ;
214
+ self
214
215
}
215
216
}
216
217
You can’t perform that action at this time.
0 commit comments