feat(runtime): add M2 live play mode, assets, export and hot reload

- play/pause/stop with a tracked-transform snapshot and validation summary
- asset browser with kind filters and image preview from project assets
- BSN and imperative Rust export through bevy_forge_core codegen
- .forge.ron watcher applying transform/name/visibility edits
- 95 runtime tests; workspace 441 passed; M2 demo docs/screenshots
This commit is contained in:
Emil Shanaty
2026-10-27 23:51:41 +03:00
parent 3eea9c020d
commit 72960eb2d0
11 changed files with 3436 additions and 4 deletions
@@ -12,14 +12,25 @@
//! `FORGE_SCENE=""` disables scene loading. With no scene (or a load failure)
//! the editor still starts with its placeholder camera and empty hierarchy.
use std::path::PathBuf;
use bevy::{prelude::*, window::WindowResolution};
use bevy_forge_runtime::EditorPlugin;
fn main() {
// Let AssetServer resolve project-relative paths (`textures/coin.png`) from the
// demo project's assets directory, not from the runtime crate's own assets.
let project =
std::env::var("FORGE_PROJECT").unwrap_or_else(|_| "examples/demo-project".to_string());
let project = std::fs::canonicalize(&project).unwrap_or_else(|_| PathBuf::from(&project));
if project.join("assets").is_dir() {
std::env::set_var("BEVY_ASSET_ROOT", &project);
}
App::new()
.add_plugins(DefaultPlugins.set(WindowPlugin {
primary_window: Some(Window {
title: "Bevy Forge — M1 Core".into(),
title: "Bevy Forge — M2 Live".into(),
resolution: WindowResolution::new(1440, 900).with_scale_factor_override(1.0),
..default()
}),