FyroxEngine / Fyrox

3D and 2D game engine written in Rust
https://fyrox.rs
MIT License
7.61k stars 340 forks source link

Add a missing reference to the script template #420

Closed z80maniac closed 1 year ago

z80maniac commented 1 year ago

The fyrox-template script utility generates an invalid code that cannot be compiled.

❯ cargo run --package editor --release
   Compiling my_game v0.1.0 (/home/user/test/my_game/game)
error[E0412]: cannot find type `FieldInfo` in this scope
  --> game/src/my_script.rs:10:17
   |
10 | #[derive(Visit, Reflect, Default, Debug, Clone)]
   |                 ^^^^^^^- help: you might be missing a type parameter: `<FieldInfo>`
   |                 |
   |                 not found in this scope
   |
   = note: this error originates in the derive macro `Reflect` (in Nightly builds, run with -Z macro-backtrace for more info)

For more information about this error, try `rustc --explain E0412`.
error: could not compile `my_game` due to previous error

This patch fixes the auto-generated code.

mrDIMAS commented 1 year ago

Good catch! I'll release a patch on crates.io asap.

mrDIMAS commented 1 year ago

Done - https://crates.io/crates/fyrox-template/0.6.1, thanks!