Web Analytics

bevy_dev_console

⭐ 135 stars Simplified Chinese by doonv

bevy_dev_console

bevy_dev_console 是一个受 Source 启发的开发者控制台插件,适用于 Bevy 游戏引擎

开发者控制台图片

[!WARNING]
>
bevy_dev_console 目前处于早期开发阶段。近期内可能会有破坏性更改(尤其是在使用内置命令解析器时)。因此,目前它仅作为 git 包提供。

功能

使用方法

``bash cargo add --git https://github.com/doonv/bevy_dev_console.git `

`rust use bevy_dev_console::prelude::*; `
  • 添加插件。
`rust,no_run use bevy::{prelude::*, log::LogPlugin}; use bevy_dev_console::prelude::*;

App::new() .add_plugins(( // Add the log plugin with the custom log layer DefaultPlugins.set(LogPlugin { custom_layer: custom_log_layer, ..default() }), // Add the dev console plugin itself. DevConsolePlugin, )) .run(); `

可切换功能

(默认) builtin-parser` 包含默认解析器。禁用它可以让你移除内置解析器并用你自己的替代(或者你也可以什么都不做,将控制台变成日志阅读器)。

Bevy 兼容性

| bevy | bevy_dev_console | | ------ | ---------------- | | 0.14.* | git (master) |

--- Tranlated By Open Ai Tx | Last indexed: 2026-07-18 ---