Closed cBournhonesque closed 1 year ago
This PR is mostly for usability. There are a lot of components that I want to replicate that are wrapper or tuple structs, such as:
#[derive(Component, Replicate)] pub struct Velocity_(pub Property<f32>)
Deriving Replicate on those structs was failing because Replicate only handled named structs. I updated the Replicatederive logic to handle structs that have unnamed fields.
Replicate
Added a unit test similar to the named struct one
Awesome! Merged into Release 0.15 (https://github.com/naia-lib/naia/pull/130). Thank you!
Context
This PR is mostly for usability. There are a lot of components that I want to replicate that are wrapper or tuple structs, such as:
Deriving
Replicate
on those structs was failing becauseReplicate
only handled named structs. I updated theReplicate
derive logic to handle structs that have unnamed fields.Test
Added a unit test similar to the named struct one