Git Product home page Git Product logo

space_editor's Introduction

space_editor: The Bevy Prefab Editor

License: MIT

Editor screenshot

space_editor is useful tool for scene/prefab/prototyping with bevy engine. Its allow to create/modify levels/scenes/prefabs in fast gui based way.

Project goal

Aspires to be editor for bevy while there is no official editor.

Main features

  • Intuitive Scene and Prefab Management: Space Editor allows you to prepare and save scenes and prefabs with an intuitive user interface. You can easily reuse them in your game development workflow.
  • bevy_xpbd_3d compatibility: Space Editor supports bevy_xpbd_3d, including all editor features.
  • Gizmo-Based manipulations: Manipulate entity positions, rotations, and scales using gizmos.
  • Component values editing: Easily edit component parameters within the editor UI
  • Seamless Editor-Game switching: Switch between the editor UI and the game effortlessly for fast prototyping and testing.
  • Prefab Reusability: Prefabs can be nested within other prefabs, improving reusability and organization in your projects.
  • Many custom components: Space Editor implements various custom components to seamlessly integrate its saving system with the standard Bevy scene format.
  • Easy API for customization: Customize or register your own components within the editor with ease, tailoring it to your specific project needs.
  • API for adding tabs: Extend the functionality of the editor by easily adding new tabs, enhancing your workflow.

Getting Started To run the editor, use the following command:

cargo run

To run platformer example, use the following command:

cargo run run --example platformer --features bevy_xpbd_3d

Usage - Game

The following explains how to integrate space_editor as a game plugin to use the created prefabs in your game.

Cargo

Add this line to your Cargo.toml file

space_editor = "0.3.0"

Prefab spawn system

To utilize the prefab spawn system, simply add the plugin to your application as follows:

App::default()
    .add_plugins(DefaultPlugins)
    .add_plugins(PrefabPlugin)

For spawning, use the PrefabBundle:

 commands.spawn(PrefabBundle::new("tile.scn.ron"))
        .insert(Name::new("Prefab"));

(More code at examples/spawn_prefab.rs)

Usage - Editor

The editor is a ready to use executable that can be used and altered at your own necessity. It's base configuration is as follows, with simple_editor_setup:

fn main() {
    App::default()
        .add_plugins(DefaultPlugins)
        .add_plugins(SpaceEditorPlugin::default())
        .add_systems(Startup, simple_editor_setup)
        .run();
}

(Code from main.rs)

Editor usage strategy

  • Fork this repo.
  • Create a branch to keep up to date with project updates and addressed bugs.
  • Editor is executed with editor feature.
  • Feel free to upstream your examples and community modules to enrich space-editor

Customization

More detailed information in docs/README.md

Custom types can be added to the editor gui and prefab spawn system with just a single line:

use editor::prelude::EditorRegistryExt;

app.editor_registry::<Name>();

The representation of components in the editor UI can also be customized by bevy_inspector_egui library.

Prefab

A prefab is simply a Bevy scene serialized to a readable and editable RON format. However, it needs to be spawned through PrefabBundle to activate custom logic such as adding global transforms to an object.

More documentation can be found at the docs folder

Contributing

Any request for adding functionality to the editor is welcome. Open an issue on the issue tracker. Any pull request is welcome too:)

License

MIT - https://choosealicense.com/licenses/mit/

Project naming

I'm using the editor to create my own Sci-Fi space game, so the name of the project starts with space_ :)

space_editor's People

Contributors

rewin123 avatar ayamaev-se avatar naomijub avatar waywardmonkeys avatar sergioribera avatar mickharrigan avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.