Table of Contents

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:

  1. Click the add (+) button in the status bar.
  2. Select Add package by name from the add menu.
  3. Enter com.viroo.studio.visualscripting in the name field.
  4. Enter the exact version (for example: 1.0.0) in the version field.

    The latest com.viroo.studio.visualscripting package version can be found here.

  5. Click Add.

Editing manifest.json file

Follow the steps below:

  1. Open manifest.json file.
  2. 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 ... */
  },
},
  1. 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.

  1. Open Unity's Project Settings' Visual Scripting Section: Edit -> Project Settings -> Visual Scripting.
  2. Expand the Node Library section.
  3. Add references to Virtualware.Networking, Viroo.Interactions, Viroo.Interactions.Unity, Viroo.VisualScripting and Viroo.VisualScripting.Unity.
  4. Press the Regenerate Nodes button.

viroo-visual-scripting-project-settings.png

viroo-visual-scripting-project-settings-nodes.png

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.

viroo-visual-scripting-variable.references.png

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.