This repository demonstrates Taichi-Unity interopability with sample scenes.
🔥 The Unity examples are still in active development. Things can break sometimes but will be fixed real soon.
If you have installed any recent version of Unity (2022.3.14 or above), this project is runnable out-of-the-box. You don't need to build taichi libraries because all the necessary native plugins are already included in Assets/Plugins
, but in case you want to, consult taichi-dev/taichi and taichi-dev/taichi-unity2 for building manuals.
If you want to create another Unity Project with Taichi integration, you need to set your first-choice graphics API to Vulkan in Player Settings in Unity because currently Taichi C-API doesn't support other graphics APIs at the moment.
You can head for File - Build Settings
to configurate and package the game application. Currently the examples can only be build for Android and Windows PC using the Vulkan API. Please refer to Unity documentations for detail. Prebuilt releases could be found on the release page.
This repository presents several demo scenes, each can be found in Assets/Scenes
:
Fractal
: A simple time-dependent texture generation kernel;ImplicitFem
: A physically-based soft-body simulation emitting vertex data on-the-flight.
Also note that the project can be built into Unity Player.
Note that some player settings are changed for Android
- Minimum version is changed to 26 (Android Oreo), which is the version the native libraries are compiled;
- Scripting backend is switched to IL2CPP;
- Library arch is set to
ARM64
, support forARMv7
is canceled; - Default orientation is fixed portrait.
We sorted out the problems you may encounter while running the demo, and will continue to add. You can find them at Build.md.