Skip to content
Closed
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
0c6a837
Add SystemConfig and some basic options
Aug 27, 2021
569513c
Cargo format
Aug 27, 2021
983a2be
System Builder Rework - In Progress
Aug 28, 2021
abd6d8b
Rename StartupConfig to conform with other traits
Aug 28, 2021
52e7fff
Remove trait_casting feature
Aug 28, 2021
011af54
SystemSet handle ExclusiveSystems
Aug 29, 2021
ecb855b
Testing SubType impl for StageConfig
Aug 29, 2021
20fd625
Sort imports and remove double refs in app.rs
Aug 29, 2021
d9f7558
Attempt at fixing `SystemConfig`, `StartupConfig`.
Ratysz Aug 31, 2021
e83c519
Merge pull request #1 from Ratysz/system-builder-syntax
Sep 1, 2021
b540f79
Separate configs and conform with StageConfig
Sep 1, 2021
3bad094
Make more system additions use the new methods
Sep 1, 2021
325689b
Found a solution to exclusive errors
Sep 1, 2021
9aeb408
Revert solution
Sep 1, 2021
d7e1e2a
Fix broken startup functionality
Sep 1, 2021
4514032
Actually use the correct impl
Sep 1, 2021
251fb40
.stage all the things
Sep 1, 2021
0995f85
Fix bevy_render error
Sep 1, 2021
2d062e6
Fix final stage.rs error
Sep 1, 2021
9a2284e
Fix all remaining crate errors
Sep 1, 2021
5487f83
Fix examples
Sep 1, 2021
1d34d96
Format
Sep 1, 2021
9822b19
Merge branch 'main' into system-builder-syntax
Sep 1, 2021
e80fded
Format again
Sep 1, 2021
7b4bb30
Fix some ci errors
Sep 1, 2021
aee8c9d
Fix InsertionPoint panic
Sep 2, 2021
eb207e5
Fix startup error
Sep 2, 2021
0c9ac6a
Fixed copy pasta failure (insertion point test)
Sep 2, 2021
6c28d69
Remove redundant fn impl
Sep 2, 2021
085a5ef
Update System docs
Sep 4, 2021
55b797c
Reduce internal config function visibility and doc
Sep 4, 2021
c8914c1
More docs
Sep 4, 2021
0a32358
Update crates/bevy_ecs/src/schedule/stage.rs
Sep 5, 2021
0f6494b
Update crates/bevy_ecs/src/system/config/system_config.rs
Sep 5, 2021
91cb4c2
Update crates/bevy_ecs/src/system/system.rs
Sep 5, 2021
b272cb4
Add specific config trait docs
Sep 7, 2021
cf372a7
Add link to SystemStage doc
Sep 7, 2021
25b1d31
Add system set conflict validation
Sep 13, 2021
d360e14
Use .any rather than for loops
Oct 2, 2021
a762965
Maybe cleaner add system set conflict checking
Oct 2, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion crates/bevy_ecs/src/schedule/stage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ impl_downcast!(Stage);
pub struct ReportExecutionOrderAmbiguities;

/// Stores and executes systems. Execution order is not defined unless explicitly specified;
/// see `SystemDescriptor` documentation.
/// see `SystemConfig` documentation.
pub struct SystemStage {
/// The WorldId this stage was last run on.
world_id: Option<WorldId>,
Expand Down
17 changes: 9 additions & 8 deletions crates/bevy_ecs/src/system/config/system_config.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use crate::{schedule::*, system::InsertionPoint};

/// Each system has one of these. It is updated using the various traits seen in this [directory](super).
#[derive(Default)]
pub struct SystemConfig {
pub labels: Vec<BoxedSystemLabel>,
Expand All @@ -13,28 +14,28 @@ pub struct SystemConfig {
}

impl SystemConfig {
pub fn add_label(&mut self, label: impl SystemLabel) {
pub(crate) fn add_label(&mut self, label: impl SystemLabel) {
self.labels.push(Box::new(label));
}
pub fn add_before(&mut self, label: impl SystemLabel) {
pub(crate) fn add_before(&mut self, label: impl SystemLabel) {
self.before.push(Box::new(label));
}
pub fn add_after(&mut self, label: impl SystemLabel) {
pub(crate) fn add_after(&mut self, label: impl SystemLabel) {
self.after.push(Box::new(label));
}
pub fn set_stage(&mut self, label: impl StageLabel) {
pub(crate) fn set_stage(&mut self, label: impl StageLabel) {
self.stage = Some(Box::new(label));
}
pub fn add_ambiguity_set(&mut self, set: impl AmbiguitySetLabel) {
pub(crate) fn add_ambiguity_set(&mut self, set: impl AmbiguitySetLabel) {
self.ambiguity_sets.push(Box::new(set));
}
pub fn set_run_criteria(&mut self, criteria: RunCriteriaDescriptorOrLabel) {
pub(crate) fn set_run_criteria(&mut self, criteria: RunCriteriaDescriptorOrLabel) {
self.run_criteria = Some(criteria);
}
pub fn startup(&mut self) {
pub(crate) fn startup(&mut self) {
self.startup = true;
}
pub fn set_insertion_point(&mut self, insertion_point: InsertionPoint) {
pub(crate) fn set_insertion_point(&mut self, insertion_point: InsertionPoint) {
self.insertion_point = insertion_point;
}
}
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_ecs/src/system/system.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ impl SystemId {
///
/// Systems are executed in parallel, in opportunistic order; data access is managed automatically.
/// It's possible to specify explicit execution order between specific systems,
/// see [SystemDescriptor](crate::schedule::SystemDescriptor).
/// see [SystemConfig](super::SystemConfig) and the other files in the [./config](super::config) directory.
pub trait System: Send + Sync + 'static {
/// The system's input. See [`In`](crate::system::In) for
/// [`FunctionSystem`](crate::system::FunctionSystem)s.
Expand Down