Crab Application is an application built with Crab Engine, to demonstrate usage, and to serve as a basic scene editor. It also makes use of the C# scripting features of Crab Engine.
Running the application with the flag --editor will open the editor. Otherwise it will run standalone. Alternatively the FORCE_EDITOR_ON define in main.cpp can be set to 1.
- Level editor
- Content browser
- Property inspector
- Scene running
- Asset hot reloading
- .NET 9.0 Runtime Installed
- MSVC 17.6 (others untested. Compiler supporting C++20 modules and import std is required)
- CMake 3.28 or newer (others untested)
- Clone the repository (with submodules):
git clone https://github.com/Unbansheee/CrabApplication.git --recursive
cd CrabApplication
- Generate Project Files
- DEV_MODE: -- ON: When this option is turned on in CMake, the application will read resources from the source directory -- OFF: When this option is turned off in CMake, the application will read resources from the compiled exe directory
cmake -S . -B build -G "Visual Studio 17 2022" -DDEV_MODE:BOOL=OFF
- Open Visual Studio Solution from the build folder
- Build and Run CrabApplication (x64). The build may fail the first time as it sets up the C# dependencies. Run it again.
Changes can be made to C# script modules under CrabApplication/script. Scripts will be compiled upon building the application. Changes can also be made at runtime. Edit the script, then run the "Build_<Module>_Scripts" target inside Visual Studio. The scripts will be recompiled and the DLL will be reloaded. Native bindings are still work-in-progress.
- Editor Jank
- Sometimes the C++ compilation can fail due to object mismatches. This is a modules bug, and building again will solve it.
- Runtime shader recompilation can be finnicky