Use the WVS-Plugin for Unity

This page shows you how to install and use the WVS-Plugin for Unity so that you can use WVS as a version control and collaboration framework in Unity. Using the plugin lets you create and submit changelists without leaving the Unity Editor.

Prerequisites

To follow the instructions on this page, you must have the following:

  • The latest WVS Desktop client is installed and initialized.
  • A Unity account and Unity Hub installed.
  • A WVS Unity project is set up and cloned.

Install the WVS-Plugin for Unity

  1. Navigate to the directory of your WVS Unity project on your workstation.
  2. In the Packages directory, open manifest.json and add the following code to the top of the file:

    {
        "scopedRegistries": [
        {
            "name": "WVS",
            "url": "https://wvs.io/api/v4/projects/1949/packages/npm",
            "scopes": [
            "io.wvs"
            ]
        }
        ],
        "dependencies": {
        "io.wvs.plugin.versioncontrol": "0.2.2"
        }
    }
    

    When completed, the file should look similar to the following:

    {
      "scopedRegistries": [
        {
          "name": "WVS",
          "url": "https://wvs.io/api/v4/projects/1949/packages/npm",
          "scopes": [
            "io.wvs"
          ]
        }
      ],
      "dependencies": {
        "io.wvs.plugin.versioncontrol": "0.2.2",
        "com.unity.collab-proxy": "1.17.1",
        "com.unity.feature.2d": "1.0.0",
        "com.unity.ide.rider": "3.0.15",
        "com.unity.ide.visualstudio": "2.0.16",
        "com.unity.ide.vscode": "1.2.5",
        "com.unity.test-framework": "1.1.31",
        "com.unity.textmeshpro": "3.0.6",
        "com.unity.timeline": "1.6.4",
        "com.unity.ugui": "1.0.0",
        "com.unity.visualscripting": "1.7.8",
        "com.unity.modules.ai": "1.0.0",
        "com.unity.modules.androidjni": "1.0.0",
        "com.unity.modules.animation": "1.0.0",
        "com.unity.modules.assetbundle": "1.0.0",
        "com.unity.modules.audio": "1.0.0",
        "com.unity.modules.cloth": "1.0.0",
        "com.unity.modules.director": "1.0.0",
        "com.unity.modules.imageconversion": "1.0.0",
        "com.unity.modules.imgui": "1.0.0",
        "com.unity.modules.jsonserialize": "1.0.0",
        "com.unity.modules.particlesystem": "1.0.0",
        "com.unity.modules.physics": "1.0.0",
        "com.unity.modules.physics2d": "1.0.0",
        "com.unity.modules.screencapture": "1.0.0",
        "com.unity.modules.terrain": "1.0.0",
        "com.unity.modules.terrainphysics": "1.0.0",
        "com.unity.modules.tilemap": "1.0.0",
        "com.unity.modules.ui": "1.0.0",
        "com.unity.modules.uielements": "1.0.0",
        "com.unity.modules.umbra": "1.0.0",
        "com.unity.modules.unityanalytics": "1.0.0",
        "com.unity.modules.unitywebrequest": "1.0.0",
        "com.unity.modules.unitywebrequestassetbundle": "1.0.0",
        "com.unity.modules.unitywebrequestaudio": "1.0.0",
        "com.unity.modules.unitywebrequesttexture": "1.0.0",
        "com.unity.modules.unitywebrequestwww": "1.0.0",
        "com.unity.modules.vehicles": "1.0.0",
        "com.unity.modules.video": "1.0.0",
        "com.unity.modules.vr": "1.0.0",
        "com.unity.modules.wind": "1.0.0",
        "com.unity.modules.xr": "1.0.0"
      }
    }
    
  3. Save the changes to manifest.json.
  4. Open your WVS Unity project in Unity Hub.
  5. When the Unity editor opens, you see a popup window that says:

    A new scoped registry is now available in the Package Manager.

    Click Read more to read the documentation. Otherwise, click Close.

  6. In the Unity editor, select the Window menu and click WVS.
  7. In the WVS window that opens, click Authenticate and log in to your WVS account to complete the installation.

Select a branch

You must select the branch that you want to work on before opening your project in Unity Editor. Changelists that you create using the plugin are pushed to the selected branch.

To select a branch, use the Desktop Client or the wvs CLI tool:

To select a branch using the Desktop Client, perform the following steps:

  1. Select the project that you want to work on:
    1. Click My projects.
    2. Select the project that you want to work on.
    3. Click Switch project.
  2. Click the branch dropdown menu next to your project name and select the branch that you want to work on.

To set the branch that you want to work on using the wvs CLI tool, perform the following steps:

  1. Navigate to your project folder. For example:

    C:\wvsProjects\unity-shootergame
    
  2. Run the following command:

    wvs branch set <BRANCH_NAME>
    

    Replace <BRANCH_NAME> with the name of the branch that you want to set.

    Note: You can get a list of existing branches by running wvs branch list.

Update the WVS-Plugin

Once the WVS-Plugin is installed, check for and install any updates for the plugin before you start using it.

In the Unity editor, select Window > Package manager and locate WVS version control to see if there’s an available update.

Create a changelist

  1. Open your WVS Unity project in Unity Hub.
  2. In the Unity editor, select the Window menu and click WVS to open the WVS window.

    Once the WVS window opens, a new changelist is automatically created.

  3. Enter a description of the changelist.

    Tip: The description of the changelist appears on the Commits page in the WVS Web Client once the changelist is committed. Adding a detailed description allows team members to quickly and easily understand what is being changed.

Work on your changelist

Once the changelist is created, all modifications to assets and project settings appear in the **Changelist **tab under one of the following categories:

Type of change Description
Added files Lists all files that are added in the changelist.
Changed files Lists all files that are modified in the changelist.
Deleted files Lists all files that are deleted in the changelist.

When you’re done working on a changelist, click Finish changelist to commit your changes.

Lock and unlock files

If you’re working on a file that’s non-mergeable, you can lock the file to ensure that a team member doesn’t make changes to it.

  1. In the Unity editor, open the WVS window by selecting Window > WVS.
  2. Click on the file that you want to lock.
  3. In the Inspector panel, click WVS grab.

You can see a list of locked files in the WVS window’s Locks tab. To unlock a file in the list, select the checkbox next to the file and click Release. All locked files are automatically released once a changelist is committed.

Next steps