Visual Scripting support
VIROO Applications are compatible with Unity's Visual Scripting framework. To add VIROO Visual Scripting packages, once you have completed the Add the VIROO Studio package steps, you will need to follow this article.
To add support for VIROO Visual Scripting components, the following packages containing the necessary functionality must be added:
- com.viroo.studio.visualscripting: This package adds Visual Scripting support to access VIROO functionality. It also contains VIROO Visual Scripting samples.
The next sections explain how to add the packages, configure the Project Settings and how to add relevant prefabs to your VIROO scenes.
Install VIROO Studio Visual Scripting package
It's possible to add the necessary package in Unity in two different ways. Choose the one you prefer from the following.
Using the Unity Editor
Open Window -> Package Manager
.
To install the needed packages:
- Click the
add (+) button
in the status bar. - Select
Add package by name
from the add menu. - Enter
com.viroo.studio.visualscripting
in thename
field. - Enter the exact version (for example:
1.0.0
) in theversion
field.The latest
com.viroo.studio.visualscripting
package version can be found here. - Click
Add
.
Editing manifest.json file
Follow the steps below:
- Open
manifest.json
file. - Add the references to the Visual Scripting packages in the
dependencies
section.
{
"dependencies": {
/* ... your other dependencies ... */
"com.viroo.studio.visualscripting": "1.0.0", /* Change 1.0.0 to the correct version */
/* ... your other dependencies ... */
},
},
- Return to Unity Editor to download the packages.
Setting Visual Scripting Project Settings
To be able to use custom Viroo Visual Scripting nodes, you'll also need to add the following references in your Project Settings.
- Open Unity's Project Settings' Visual Scripting Section:
Edit -> Project Settings -> Visual Scripting
. - Expand the
Node Library
section. - Add references to
Virtualware.Networking
,Viroo.Interactions
,Viroo.Interactions.Unity
,Viroo.VisualScripting
andViroo.VisualScripting.Unity
. - Press the
Regenerate Nodes
button.
These steps will enable you to reference Viroo's custom Visual Scripting nodes in your Script Machines.
Context Menu -> Events -> Viroo
Context Menu -> Viroo
Additionally, you will be able to reference Viroo MonoBehaviour components as Visual Scripting variables.
Add Visual Scripting prefab to your VIROO scenes
To access VIROO functionality from your Script Machines, the following prefab should be added to yours scene. To find this prefab, you can use the Search
function of the Unity Project
tab, selecting the In packages
option.
- VirooVisualScripting: this prefab contains the necessary components to act as a bridge between the VIROO core and your Script Machines. It also contains the necessary components to access Network Variables from your Script Machines.
Save the scene.