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 {
183183 /// Switch the context assigning strategy to a global context assigner.
184184 ///
185185 /// 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 ;
188188}
189189
190190impl < P : IntoScriptPluginParams + AsMut < ScriptingPlugin < P > > > ConfigureScriptPlugin for P {
@@ -209,8 +209,9 @@ impl<P: IntoScriptPluginParams + AsMut<ScriptingPlugin<P>>> ConfigureScriptPlugi
209209 self
210210 }
211211
212- fn enable_context_sharing ( mut self ) {
212+ fn enable_context_sharing ( mut self ) -> Self {
213213 self . as_mut ( ) . context_assigner = ContextAssigner :: new_global_context_assigner ( ) ;
214+ self
214215 }
215216}
216217
You can’t perform that action at this time.
0 commit comments