You are here:

LightAct’s integration with Unity game engine is done with 2 plugins. Spout4Unity plugin takes care of texture sharing via Spout framework and LightAct4Unity is responsible for data sharing. You can download them for free on our GitHub page.

Using Extremely Simple Unity Project sample

If you’d like to avoid the hassle of downloading and installing the above plugins yourself, you can download an already-made Unity sample project. It was made using Unity 2019.2.12f1

This project works out-of-the-box with Extremely Simple Unity Integration sample LightAct project available in Unity tab on Intro window.

In order to get this integration up and running, your first step should be to open that sample project in LightAct by clicking on Open this project button or on the image.

Once it opens, you’ll see a black video screen and a blue sphere in the Visualizer. 

By the end of this article, you’ll make the video screen display the content from Unity and the sphere will float up and down based on the data from Unity.

Opening & Running Sample Unity project

After you’ve downloaded the sample project you can open it by either:

1. Adding the project folder in Unity Hub and opening it from there or

2. double clicking on Scene.unity file that’s available in /Extremely Simple Unity Project/Assets/Scenes folder.

When the project opens, you’ll see a basic scene. It consists of a ‘screen-like’ plane, a red cube, a blue sphere and a yellow text.

After you click play (provided that you still have LightAct running the sample project in the background), you should see something similar to above. The red cube should start rotating (based on data from LightAct), the ‘screen’ should display a moving color gradient (coming from LightAct), the text should change to ‘Hello from LightAct’ (also based on the data from LightAct). The movement of blue sphere up and down is done with a Unity script.

On LightAct’s side, things should also have changed a bit:

The previously black screen should now display a texture coming from Unity. On top this texture, we also render some text, which is also coming from Unity. The blue sphere in the Visualizer is slowly moving up and down in the same rhythm as the sphere in Unity.

If you want to explore how these 2 projects are done , click on the next article on the sidebar on the left.