> For the complete documentation index, see [llms.txt](https://docs.viverse.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.viverse.com/unity-sdk/porting-from-unity-to-playcanvas.md).

# Porting from Unity to PlayCanvas

This document provides information and guides related to the tools needed to migrate a Unity project to PlayCanvas.

***

## Install Unity Export Tool

**Instructions for using the Unity plugin that will export data, images, models, etc. from Unity and outputs the resources to a folder inside the Unity project**

{% stepper %}
{% step %}

#### Install the Unity Export Tool package into the Unity project

To install the Unity Export Tool package, open up the Unity project and go to menu option **Assets > Import Package > Custom Package.**

<figure><img src="https://1140075852-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4pMiThqqrBzfvP8uy5am%2Fuploads%2FIMTgV8HUaQ9OQvauXVYP%2Fimage.png?alt=media&amp;token=765f6153-71a3-4711-93ef-e86014ba215c" alt="" width="375"><figcaption></figcaption></figure>
{% endstep %}

{% step %}

#### Select Unity package to install

Navigate to the location of the **PlayCanvasSceneCreator** Unity package and select it. Click **Open**.

<figure><img src="https://1140075852-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4pMiThqqrBzfvP8uy5am%2Fuploads%2FyoWKbgLjwJZ0jS4o7sIm%2Fimage.png?alt=media&amp;token=2728537b-e1fb-4920-90cc-aa77f9a81c7d" alt="" width="375"><figcaption></figcaption></figure>
{% endstep %}

{% step %}

#### Review and confirm files for installation

Click **Import**

<figure><img src="https://1140075852-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4pMiThqqrBzfvP8uy5am%2Fuploads%2Fqhp1C7NCv7ioELLouVMm%2Fimage.png?alt=media&amp;token=44594893-db58-49c9-846d-5c51f0326ada" alt="" width="302"><figcaption></figcaption></figure>
{% endstep %}

{% step %}

#### Confirm installation was successful

Confirm the PlayCanvas folder has been created in the **Assets** window.

<figure><img src="https://1140075852-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4pMiThqqrBzfvP8uy5am%2Fuploads%2FedOIIZj5OYr9cO8vX3rs%2Fimage.png?alt=media&amp;token=3115762c-671d-4924-a2f8-a5fc8e962475" alt="" width="287"><figcaption></figcaption></figure>
{% endstep %}

{% step %}

#### Open up window for Unity Export Tool

In Unity project, go to menu option **Window > Playcanvas > Playcanvas Transform Window.**

<figure><img src="https://1140075852-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4pMiThqqrBzfvP8uy5am%2Fuploads%2FIxT6TLsNtvvuMwBnWJe2%2Fimage.png?alt=media&amp;token=cede52ea-bdfa-43c4-87c1-4e794aa09b7e" alt="" width="375"><figcaption></figcaption></figure>
{% endstep %}

{% step %}

#### Start the export process

Move the **PlaycanvasTransformWindow** tab beside the **Inspector** tab for easy access. Click the **Export Playcanvas** button.

<figure><img src="https://1140075852-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4pMiThqqrBzfvP8uy5am%2Fuploads%2FY8Dy5L73wEq4Fez67Jix%2Fimage.png?alt=media&amp;token=19d628d1-3a20-4cd7-ac72-f0435105972f" alt="" width="375"><figcaption></figcaption></figure>
{% endstep %}

{% step %}

#### Locate the generated folder

The **PlaycanvasBuild** folder will be created inside the parent folder of the Unity project. If the Unity project's location is D:\Projects\Unity\Unity\_PlayCanvas\_Export\_Sample, then the **PlaycanvasBuild** folder should be located in D:\Projects\Unity.

<figure><img src="https://1140075852-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4pMiThqqrBzfvP8uy5am%2Fuploads%2FJnfCPt7cB69N7UU9vwNc%2Fimage.png?alt=media&amp;token=3e9c8bb3-20c4-4494-831e-07156c9ad2e1" alt="" width="375"><figcaption></figcaption></figure>
{% endstep %}

{% step %}

#### Confirm the export was successful

The files that will be imported into PlayCanvas can be found in the **PlaycanvasBuild\ExportedAssets** folder.

<figure><img src="https://1140075852-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4pMiThqqrBzfvP8uy5am%2Fuploads%2FR1OnPrIYx3TQw25so6Oe%2Fimage.png?alt=media&amp;token=7448876d-ef34-4081-a6e7-810679644be6" alt="" width="375"><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}

## Install Unity2PlayCanvas Browser Extension

**Instructions for installing the Unity2PlayCanvas browser extension**

Download the Unity2PlayCanvas browser extension. There are two ways install to install the extension. Use only one method of installation (<mark style="color:red;">Important!</mark>).

**Method 1 for installing the Unity2PlayCanvas browser extension using Google Chrome installation method (Recommended).**

{% stepper %}
{% step %}

#### Open Chrome browser extensions page

Open chrome browser and go to url: chrome://extensions/
{% endstep %}

{% step %}

#### Configure Chrome browser for Developer Mode

Click the **Developer mode button** on the Extensions page to enable Developer Mode

<figure><img src="https://1140075852-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4pMiThqqrBzfvP8uy5am%2Fuploads%2Fl0mdxwCS5apxqJmwcpAq%2Fimage.png?alt=media&amp;token=dc8f11e8-d4bf-4027-b69d-643b3b1ce851" alt="" width="375"><figcaption></figcaption></figure>
{% endstep %}

{% step %}

#### Install browser extension

Click the **Load unpacked** button to install the extension (select folder ‘{Release file}/Extension’)

<figure><img src="https://1140075852-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4pMiThqqrBzfvP8uy5am%2Fuploads%2FNJCTpvngXawTqRRfbBZF%2Fimage.png?alt=media&amp;token=f3dd6ed8-cf11-45e0-b6e9-8039d173a97c" alt="" width="375"><figcaption></figcaption></figure>
{% endstep %}

{% step %}

#### Confirm browser extension was installed successfully

The browser extension will be added to the **All Extensions** list with remove and reload button.

<figure><img src="https://1140075852-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4pMiThqqrBzfvP8uy5am%2Fuploads%2FAevZkJ43J55pUS8gyMKj%2Fimage.png?alt=media&amp;token=9ee16587-8da1-4276-ac0e-c943cfc35cbe" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}

**Method 2 for installing the Unity2PlayCanvas browser extension using Tampermonkey installation method.**

{% stepper %}
{% step %}

#### Download Tampermonkey browser extension

The Tampermonkey browser extension can be downloaded here: <https://www.tampermonkey.net>
{% endstep %}

{% step %}

#### Open Tampermonkey dashboard

Open plugin dashboard (this example uses chrome)

<figure><img src="https://1140075852-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4pMiThqqrBzfvP8uy5am%2Fuploads%2FQ3H7ZxH9ovKFDyM7ddxb%2Fimage.png?alt=media&amp;token=f802f556-52a2-4a92-a93e-1f49b3a0e7fa" alt="" width="216"><figcaption></figcaption></figure>
{% endstep %}

{% step %}

#### Install Unity2PlayCanvas browser extension

Drag the Unity2PlayCanvas.js file into the Tampermonkey dashboard. The file location should be ‘{Release file}/Extension/Unity2Playcanvas.user.js’ script.

<figure><img src="https://1140075852-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4pMiThqqrBzfvP8uy5am%2Fuploads%2FeOuG2HB5YTntLJpIyknZ%2Fimage.png?alt=media&amp;token=de04848e-dde0-4fa2-ad16-0885377b2eb7" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

#### Refresh PlayCanvas editor

Refresh the PlayCanvas editor after adding or updating the script. Delete the old script before updating to new version of the script.
{% endstep %}

{% step %}

#### Uninstalling the Unity2PlayCanvas browser extension

In order to uninstall the Unity2PlayCanvas browser extension, open the Tampermonkey dashboard and click the trash can icon.
{% endstep %}
{% endstepper %}

## Import Unity Scene into PlayCanvas

**Instructions for using the PlayCanvas browser extension that will recreate the Unity scene in PlayCanvas editor from the resources generated by the Unity Export Tool**

Integrate the Unity scene into the PlayCanvas editor by creating assets (materials, state graphs) and entities.

{% stepper %}
{% step %}

#### Create/select an output folder in PlayCanvas

In PlayCanvas editor, create/select an empty folder under root of Assets folder (<mark style="color:red;">Important!</mark>).
{% endstep %}

{% step %}

#### Upload generated files to output folder

Under path ‘{Unity project's Parent folder}\PlaycanvasBuild\ExportAssets’, select all files generated by Unity tool then drag into the folder in PlayCanvas editor.

<figure><img src="https://1140075852-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4pMiThqqrBzfvP8uy5am%2Fuploads%2FNvcVn9bi9m1mEGb3IV1A%2Fimage.png?alt=media&amp;token=439fe104-fe79-4600-82cb-59bf6afebde4" alt="" width="312"><figcaption></figcaption></figure>
{% endstep %}

{% step %}

#### Wait for uploading to complete

<figure><img src="https://1140075852-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4pMiThqqrBzfvP8uy5am%2Fuploads%2FmzJysDgYcat2s1ocqB2K%2Fimage.png?alt=media&amp;token=d5554dc5-4ed7-49e9-b2e3-394ebd6357fd" alt="" width="294"><figcaption></figcaption></figure>
{% endstep %}

{% step %}

#### Start process

Click the Unity2PlayCanvas dropdown to expand/hide the panel and click the ‘Run Progress’ button

<figure><img src="https://1140075852-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4pMiThqqrBzfvP8uy5am%2Fuploads%2FY87DZrZXhxl6pUXVs38M%2Fimage.png?alt=media&amp;token=a5aa8e7f-825b-4318-aada-6b3d99a51654" alt="" width="188"><figcaption></figcaption></figure>
{% endstep %}

{% step %}

#### Wait for process to complete

<figure><img src="https://1140075852-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4pMiThqqrBzfvP8uy5am%2Fuploads%2FTLgdYINobL7XeuvNFoEN%2Fimage.png?alt=media&amp;token=30d9fc32-38df-4521-a05e-15489245829b" alt="" width="178"><figcaption></figcaption></figure>
{% endstep %}

{% step %}

#### Check for errors in the process

Hover over the error messages to read them and click ‘view’ button to check problem entity or asset.

<figure><img src="https://1140075852-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4pMiThqqrBzfvP8uy5am%2Fuploads%2FnIH7JWrbODRk4T8r16eq%2Fimage.png?alt=media&amp;token=908f8d70-8d61-49c6-8f44-934b3e166fff" alt="" width="174"><figcaption></figcaption></figure>
{% endstep %}

{% step %}

#### Rerun the process if needed

If you want to rerun the process, scroll down in the panel to the bottom and click ‘Clear Created’ button, then wait for progress to delete all created entities and assets

<figure><img src="https://1140075852-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4pMiThqqrBzfvP8uy5am%2Fuploads%2FZT3faTs7jOM3gcYNabwI%2Fimage.png?alt=media&amp;token=14d9e5ad-5019-4da3-97d4-2329b04063f5" alt="" width="174"><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}

## Unity Export Tool and Unity2PlayCanvas Browser Extension Release Notes

**Installation Package and Release Notes**

Download:

{% file src="/files/oHLp8fGEDX6qtUoqpmDh" %}

Please refer to [Unity Export tool](#install-unity-export-tool) for usage instructions of the PlayCanvasSceneCreator.unitypackage.

Please refer to [Install Unity2PlayCanvas Browser Extension](#install-unity2playcanvas-browser-extension) for instructions on how to use the files under the 'Extension' folder.

We provide a document for querying currently supported components and properties, please see ‘/Document/API/index.html’.

| Release Date | Version | Release Notes                                                                                                                                                                                                                                                                                                                              |
| ------------ | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| 10/18/2024   | 1.0.10  | <p>add support</p><ul><li>text alignment</li><li>canvas group</li></ul><p>fix</p><ul><li>element use input</li></ul>                                                                                                                                                                                                                       |
| 9/6/2024     | 1.0.9   | <p>add auto upload tool<br>add support</p><ul><li>ui raw image</li><li>text element wrapLines</li></ul><p>fix</p><ul><li>null case of state motion, scrollbar</li><li>skip hide game object</li><li>scrollview / image / layout on same gameobject</li><li>image mask opacity</li><li>ui entity add layer ui</li></ul>                     |
| 8/16/2024    | 1.0.8   | <p>add support</p><ul><li>skybox cubemap</li></ul><p>fix</p><ul><li>invalid template name</li><li>material opacity adjust</li><li>material missing map</li><li>export animation on disable gameobject</li><li>light type string</li></ul>                                                                                                  |
| 8/2/2024     | 1.0.7   | <p>add support</p><ul><li>particle system MainModule</li></ul><p>fix</p><ul><li>model without material</li><li>remove unused component when use template</li></ul>                                                                                                                                                                         |
| 7/19/2024    | 1.0.6   | <p>fix</p><ul><li>assets file name add id</li><li>improve animation</li><li>improve material reflection</li></ul>                                                                                                                                                                                                                          |
| 6/28/2024    | 1.0.5   | <p>fix</p><ul><li>Quad</li><li>extension fix find render</li><li>Asset Null handle</li></ul>                                                                                                                                                                                                                                               |
| 6/7/2024     | 1.0.4   | <p>add components</p><ul><li>text</li></ul><p>add support</p><ul><li>material opacity map</li><li>material skybox reflection</li></ul><p>fix</p><ul><li>layout</li><li>particles color</li><li>mesh renderer active</li><li>mesh load fail</li><li>shader color property</li><li>template id sequence</li><li>extension api fail</li></ul> |
| 5/27/2024    | 1.0.3   | <p>add components</p><ul><li>Scroll view</li><li>Improve 3d animation file size</li></ul>                                                                                                                                                                                                                                                  |
| 5/3/2024     | 1.0.2   | <p>add components</p><ul><li>Layer & tag</li><li>Skybox</li><li>Layout group</li><li>Settings</li></ul>                                                                                                                                                                                                                                    |
| 4/8/2024     | 1.0.1   | <p>add components</p><ul><li>Collider</li><li>Rigidbody</li><li>Particle system</li></ul>                                                                                                                                                                                                                                                  |
| 3/12/2024    | 1.0.0   | first version                                                                                                                                                                                                                                                                                                                              |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.viverse.com/unity-sdk/porting-from-unity-to-playcanvas.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
