/BevyTauriExample

Render bevy natively in tauri2 window

Primary LanguageRust

Bevy + Tauri Example

This is an example of how to use Tauri as the window manager for a Bevy game. Rendering everything native in bevy and using Tauri for the window management and UI elements.

image

The Example

There are two different examples in the same codebase: wgpu and bevy. If you want to run the wgpu example, you need to give additional flag as the following command after building the release version:

cd src-tauri/ && src-tauri/target/release/btexample --use-wgpu

Development

This project is using the Tauri framework for the window manager and UI elements. And the build tools from tauri-cli and yarn.

To run a development server, you can use the following command:

yarn tauri dev

Build the release version:

yarn tauri build

Recommended IDE Setup

测试了在tauri中直接显示bevy画面,可以为以后以tauri来实现一个bevy editor打下基础

  • 在bevy中通过viewport让camera直接显示在屏幕的某个地方,那个地方可以作为显示3d的视图
  • 屏幕中的其他地方均为tauri的显示区域