File tree Expand file tree Collapse file tree 1 file changed +34
-2
lines changed
crates/bevy_ecs/src/world Expand file tree Collapse file tree 1 file changed +34
-2
lines changed Original file line number Diff line number Diff line change 2
2
3
3
use super :: { Mut , World } ;
4
4
use crate :: {
5
+ archetype:: Archetypes ,
6
+ bundle:: Bundles ,
5
7
change_detection:: { MutUntyped , Ticks } ,
6
- component:: ComponentId ,
8
+ component:: { ComponentId , Components } ,
9
+ entity:: Entities ,
10
+ storage:: Storages ,
7
11
system:: Resource ,
8
12
} ;
9
13
use bevy_ptr:: Ptr ;
10
- use bevy_ptr:: UnsafeCellDeref ;
11
14
use std:: any:: TypeId ;
12
15
13
16
/// Variant of the [`World`] where resource and component accesses takes a `&World`, and the responsibility to avoid
@@ -84,6 +87,35 @@ impl<'w> InteriorMutableWorld<'w> {
84
87
self . 0
85
88
}
86
89
90
+ /// Retrieves this world's [Entities] collection
91
+ #[ inline]
92
+ pub fn entities ( & self ) -> & ' w Entities {
93
+ & self . 0 . entities
94
+ }
95
+
96
+ /// Retrieves this world's [Archetypes] collection
97
+ #[ inline]
98
+ pub fn archetypes ( & self ) -> & ' w Archetypes {
99
+ & self . 0 . archetypes
100
+ }
101
+
102
+ /// Retrieves this world's [Components] collection
103
+ #[ inline]
104
+ pub fn components ( & self ) -> & ' w Components {
105
+ & self . 0 . components
106
+ }
107
+
108
+ /// Retrieves this world's [Storages] collection
109
+ #[ inline]
110
+ pub fn storages ( & self ) -> & ' w Storages {
111
+ & self . 0 . storages
112
+ }
113
+
114
+ /// Retrieves this world's [Bundles] collection
115
+ #[ inline]
116
+ pub fn bundles ( & self ) -> & ' w Bundles {
117
+ & self . 0 . bundles
118
+ }
87
119
/// Gets a reference to the resource of the given type if it exists
88
120
///
89
121
/// # Safety
You can’t perform that action at this time.
0 commit comments