Closed ProgrammerPeter2 closed 1 year ago
The error is that I can't create an instance of TransitionType::CrossDissolve
because the code has no idea how to create CrossDissolveConfig
.
The the solution would be to add
#[derive(Clone, Copy, Resource, FromReflect, Reflect, Default)]
#[reflect(Resource, Default)]
pub struct CrossDissolveConfig {}
app.register_type::<CrossDissolveConfig>();
Would this error message be clear enough or do you have suggestions for how to make it better?
Yes, this will be clear enough.
I have an enum resource with structs in it, but when I want to change the variant I have the following error message: " TransitionType has unconstructable variants: Cross Dissolve, you should register ReflectDefault for all fields.". ReflectDefault is a struct so I can't implement it to my config. I saw #116, but something still in darkness in front of me: where should I add the
#[reflect(Default)]
attribute to work?My code
lib.rs
angled.rs
dissolve.rs