You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
These examples demonstrate the main features of Bevy and how to use them.
To run an example, use the command cargo run --example <Example>, and add the option --features x11 or --features wayland to force the example to run on a specific window compositor, e.g.
cargo run --features wayland --example hello_world
⚠️ Note: for users of releases on crates.io!
Due to changes and additions to APIs, there are often differences between the development examples and the released versions of Bevy on crates.io.
If you are using a release version from crates.io, view the examples by checking out the appropriate git tag, e.g., users of 0.4 should use the examples on https://github.com/bevyengine/bevy/tree/v0.4.0/examples
If you have cloned bevy's repo locally, git checkout with the appropriate version tag.
In an ideal world, this will boot up, install and run the app for the first
iOS simulator in your xcrun simctl devices list. If this fails, you can
specify the simulator device UUID via:
DEVICE_ID=${YOUR_DEVICE_ID} make run
If you'd like to see xcode do stuff, you can run
open bevy_ios_example.xcodeproj/
which will open xcode. You then must push the zoom zoom play button and wait
for the magic.
The Xcode build GUI will by default build the rust library for both
x86_64-apple-ios, and aarch64-apple-ios which may take a while. If you'd
like speed this up, you update the IOS_TARGETS User-Defined environment
variable in the "cargo_ios target" to be either x86_64-apple-ios or
aarch64-apple-ios depending on your goal.
Note: if you update this variable in Xcode, it will also change the default
used for the Makefile.
Following is an example for headless_wasm. For other examples in wasm/ directory,
change the headless_wasm in the following commands and editexamples/wasm/index.html
to point to the correct .js file.