![]() |
FirstModulAR 0.1.0
|
This repository is a collection of assets designed to integrate the Pulse Physiology Engine within Unity3D.
Any contributions to this repository need to be done using Unity 2019.4.X LTS
This unity version was chosen as it is Long Term Supported and provides compatibility with all targeted platfroms.
There is no reason why this asset could not be used by earlier versions of Unity, but those don't easily support all of our targeted platforms.
The Pulse Unity Asset is available for download on the Unity Asset Store.
Each release is associated with a Unity Asset Package which can be downloaded from our release page.
This project uses Git LFS for data (.csv, .json state files) and binaries (libraries in Plugins), so ensure that Git LFS is installed and that you've run git lfs install.
To be able to access the Pulse Unity Asset, this whole repository needs to live somewhere under the Assets folder of your Unity project. For example:
Therefore:
If YourProject is version-controlled with Git, you can add our asset as a submodule instead:
The user manual needs to be embedded in the Unity asset package according to the Unity Asset Store submission guidelines (section 3.2) and can therefore be found at Documentation/PulseUnityAssetUserManual.pdf
To learn more about the Pulse api used by scripts in this repository, check out our C# API Examples
One instance of a Pulse Engine simulates 1, and only 1, patient. You can initialize a Pulse patient in 2 ways:
This is the easiest and quickest way to start Pulse. This asset provides several pregenerated patient states for you to use You can use these states to create your own new states as well.
You only need to provide Provide the Pulse API the state file, or its contents. (StreamingAssets are not used when loading from a state file/string!)
If you wish to define your own patient, you may do so with the Pulse API. When doing so, Pulse will need to read files from disk. If you are doing this within Unity, you will need to copy the Data directory into your applications StreamingAssets folder. You can rename it to anything you wish.
You will need to provide the Pulse InitializeEngine method the location of this directory in your code, for example:
Current version of Pulse engine
Functionality from the C++ API of the Pulse engine are encapsulated in the following plugins:
.dll for Windows.so for Linux, Lumin and Android.dylib for MacOS.a for Web AssemblyThe binaries/plugins above will be built along with the Pulse engine (steps here), noting that:
PulseC) need to be built on each of your target platformsThe Pulse Unity Asset will not work out of the box in Unity projects built with the IL2CPP compiler due to bytecode stripping. The provided Pulse plugins are impacted by this (Google Protocol Buffers used in Pulse for serialization), which results in stripping of code that is actually necessary for Pulse. A link.xml file (contents below) should be placed in your assets folder root to effectively disable bytecode stripping by preserving both types and full assemblies.
If you need to use the IL2CPP compiler and it is preventing you from integrating Pulse in your Unity application, let us know on our Discourse support forum.
The Pulse Unity Asset only exposes a portion of the functionality available in the C++ interface of the Pulse engine. If you need to expose more functionality from the C++ library in Unity, you need to:
If you are interested in collaborating with us to bring more of the Pulse engine functionality to Unity, you can contact us at kitwa.nosp@m.re@k.nosp@m.itwar.nosp@m.e.co.nosp@m.m.
Before we can bring any capabilities to the Pulse Unity Asset, they will need to be part of the Pulse Engine repository. You can contribute your changes there to facilitate their integration to the Unity Asset in the future. If you need help designing a custom solution based on Pulse, you can contact us at kitwa.nosp@m.re@k.nosp@m.itwar.nosp@m.e.co.nosp@m.m.
Ask your questions and share your remarks in our issue tracker on GitLab: https://gitlab.kitware.com/physiology/unity/issues
You can find support on our Discourse support forum.
You can follow this simple forking workflow:
master