katharostech / bevy_retrograde

Plugin pack for making 2D games with Bevy
Other
296 stars 9 forks source link

I've tried to compile "Hello, World" example, but "translation" seems to be missing from SpriteBundle. There is a position component, though. #54

Closed SolAstri closed 3 years ago

SolAstri commented 3 years ago
error[E0560]: struct `bevy_retrograde::prelude::SpriteBundle` has no field named `transform`
  --> src/main.rs:48:13
   |
48 |             transform: Transform::from_xyz(0., 0., 0.),
   |             ^^^^^^^^^ `bevy_retrograde::prelude::SpriteBundle` does not have this field
   |
   = note: available fields are: `sprite`, `image`, `visible`, `position`, `world_position`
zicklag commented 3 years ago

Hey there! The code you are trying to compile looks like it's off of the master branch, which isn't published to crates.io yet. You've got a couple of options:

  1. You could use the master version of Bevy Retrograde by switching the bevy_retrograde dependency to this in your Cargo.toml:
    bevy_retrograde = { git = "https://github.com/katharostech/bevy_retrograde" }
  2. You could look at the example code for our currently released version here

Because we're going to be releasing a new update soon, and because there are a good set of changes, it would probably be easier for you to just use the git dependency until we get the next release out.

SolAstri commented 3 years ago

It seems there is a version conflict in the master version of Bevy Retrograde.

cargo build                    
    Updating git repository `https://github.com/katharostech/bevy_retrograde`
    Updating crates.io index
    Updating git repository `https://github.com/katharostech/heron.git`
error: failed to select a version for `heck`.
    ... required by package `spirv-std-macros v0.4.0-alpha.10`
    ... which is depended on by `spirv-std v0.4.0-alpha.8`
    ... which is depended on by `glam v0.13.1`
    ... which is depended on by `bevy_math v0.5.0`
    ... which is depended on by `bevy_core v0.5.0`
    ... which is depended on by `bevy_diagnostic v0.5.0`
    ... which is depended on by `bevy_asset v0.5.0`
    ... which is depended on by `bevy_internal v0.5.0`
    ... which is depended on by `bevy v0.5.0`
    ... which is depended on by `RustJRPG v0.1.0 (/home/solmann/CLionProjects/RustJRPG)`
versions that meet the requirements `=0.3.3` are: 0.3.3

all possible versions conflict with previously selected packages.

  previously selected package `heck v0.3.2`
    ... which is depended on by `duplicate v0.3.0`
    ... which is depended on by `heron_core v0.9.1 (https://github.com/katharostech/heron.git?branch=ktech-patches#719701a1)`
    ... which is depended on by `heron v0.9.1 (https://github.com/katharostech/heron.git?branch=ktech-patches#719701a1)`
    ... which is depended on by `bevy_retrograde_physics v0.1.0 (https://github.com/katharostech/bevy_retrograde#d81e6629)`
    ... which is depended on by `bevy_retrograde v0.1.0 (https://github.com/katharostech/bevy_retrograde#d81e6629)`
    ... which is depended on by `RustJRPG v0.1.0 (/home/solmann/CLionProjects/RustJRPG)`

failed to select a version for `heck` which could resolve this conflict
SolAstri commented 3 years ago

I've deleted and recreated my Cargo.lock, seems to work now, thanks.

zicklag commented 3 years ago

Glad you got it working! Let me know if you have any more trouble. 🙂