Creating a VIROO application
A VIROO application must have an initial scene, VIROO Main, which must be added from a template scene provided by VIROO Studio. The application's own content is added in other scenes (see Adding Content to your VIROO Application).
Furthermore, there are some more settings to make in your Unity project, also listed on this page.
Before you begin: To start creating your first scene, you must have configured your development environment. This includes making sure that you are using the correct version of Unity, that you have installed the VIROO Studio package and that you have the project set up correctly. See more information at Set up your Basic Environment.
Add VIROO Main scene
If you have downloaded the VIROO Studio template and you aren't creating a Viroo project from scratch, the Main scene is already included in the project by default.
You can verify this by navigating to File > Build Profiles
and checking the Scene List
for a scene named Main.
If the scene is present, you can skip this step and proceed to Configure the Application Identifier.
When publishing VIROO Application, the runtime, VIROO Main, must be included in the application. To do so, the following steps must be followed:
- In Unity, go to
File -> New Scene
. Select theVIROO Main
template and click onCreate
.
- Save the scene (
File -> Save
). - Go to
File -> Build settings...
and add the scene you just created to theScenes in Build
list, in the first position (index 0).
Note
The scenes that you include in your application don't need to be added to this list, when you publish the application VIROO Studio will take care of including them in the build.
Configure the Application Identifier
Your application needs to have a unique identifier to function correctly on the VIROO platform.
To set the ID of your application:
- In Unity, go to
Edit -> Project Settings -> Viroo
. - Set your application identifier in the
Application Identifier
field.
Configure the Application Title
Your application must have a title that helps you identify it correctly when using it.
To set your application title:
- In Unity, go to
Edit -> Project Settings -> Player
. - Set your application title in the
Product Name
field.
Configure Vivox
Vivox is a real-time voice and text communication service provided by Unity.
If you wish to use it, some configurations are required. Otherwise, you can skip this step.
The first step is to navigate to the VIROO Main scene that was generated in the previous step and enable the Vivox GameObject, as it's disabled by default.
To do this:
- Open the VIROO Main scene that you have already created.
- Locate the
VirooVivoxVoiceCommunication
GameObject, which is currently disabled. - Select it and enable it.
Open
Edit -> Project Settings -> Services -> Vivox
and follow the steps to link a project from the Unity Dashboard.Create a file named
appsettings.json
inAssets/StreamingAssets
with the following content:
{
"Vivox": {
"Server": "",
"Domain": "",
"TokenIssuer": "",
"TokenKey": ""
}
}
To get the credentials:
- Go to Unity Dashboard.
- Select the appropriate project (or create a new one).
- Go to
Services -> Vivox Voice and Text Chat -> Credentials
.