visage|SDK allows easy integration with Unity 3D game engine using VisageTrackerUnityPlugin
and VisageAnalyserUnityPlugin,
wrappers that expose VisageTracker's and VisageFaceAnalyser's functionalities for use in managed programming language such as C#.
In order to use visage|SDK in your own Unity project, libraries and selected data files need to be included.
Unity sample application VisageTrackerUnityDemo is provided in visage|SDK as
a ready-to-build project with all necessary dependencies and can be used as a reference.
Following steps are required to integrate visage|SDK in your own project:
Pre-build step:
Post-build step:
<body>
<script>
...
var unityGame;
var script = document.createElement("script");
script.src = loaderUrl;
script.onload = () => {
createUnityInstance(canvas, config, (progress) => {
progressBarFull.style.width = 100 * progress + "%";
}).then((unityInstance) => {
loadingBar.style.display = "none";
unityGame = unityInstance;
fullscreenButton.onclick = () => {
unityInstance.SetFullscreen(1);
};
}).catch((message) => {
alert(message);
});
};
document.body.appendChild(script);
</script>
</body>