Skip to content

Commit 3cbad2d

Browse files
authored
Merge branch 'main' into feat/refactor-handler-context-as-system-param
2 parents 8da49ca + 86eafe5 commit 3cbad2d

File tree

3 files changed

+23
-6
lines changed

3 files changed

+23
-6
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
local type = world.get_type_by_name("UnitStruct")
2+
local constructed = construct(type, {})
3+
4+
assert(constructed ~= nil, "Value was not constructed")
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
let type = world.get_type_by_name.call("UnitStruct");
2+
let constructed = construct.call(type, #{});

crates/testing_crates/test_utils/src/test_data.rs

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,16 @@ impl TestResourceWithVariousFields {
147147
}
148148
}
149149

150+
#[derive(Component, Reflect, PartialEq, Eq, Debug, Default)]
151+
#[reflect(Component, Default)]
152+
pub struct UnitStruct;
153+
154+
impl UnitStruct {
155+
pub fn init() -> Self {
156+
Self
157+
}
158+
}
159+
150160
#[derive(Component, Reflect, PartialEq, Eq, Debug, Default)]
151161
#[reflect(Component, Default)]
152162
pub struct SimpleStruct {
@@ -264,14 +274,15 @@ impl_test_component_ids!(
264274
CompWithDefault => 2,
265275
CompWithDefaultAndComponentData => 3,
266276
CompWithFromWorldAndComponentData => 4,
267-
SimpleStruct => 5,
268-
SimpleTupleStruct => 6,
269-
SimpleEnum => 7,
277+
UnitStruct => 5,
278+
SimpleStruct => 6,
279+
SimpleTupleStruct => 7,
280+
SimpleEnum => 8,
270281
],
271282
[
272-
TestResource => 8,
273-
ResourceWithDefault => 9,
274-
TestResourceWithVariousFields => 10,
283+
TestResource => 9,
284+
ResourceWithDefault => 10,
285+
TestResourceWithVariousFields => 11,
275286
]
276287
);
277288

0 commit comments

Comments
 (0)