Unity To PlayCanvas Assets Importer - POC

I wrote a small plugin for importing assets from Unity to PlayCanvas for a POC.

This plugin has two parts; one converts the Unity scene into .json, and the second iterates through the entries in this .json file, looks for each template by its name and places it in the scene hierarchy in the PlayCanvas scene.

It applies transform (position, rotation, scale), and sets up materials and their textures in PlayCanvas as it places them in the scene hierarchy all by itself.

Currently, I am not importing directly from Unity and some manual labor is required to bring in the models inside PlayCanvas project from Unity and that’s mainly because I couldn’t find an API that allows me to import the assets. (would love to know if there is one)

Once the models are inside PlayCanvas, this plugin does the rest for setting up the scene for you.

For context, this is POLYGON Farm assetpack for Unity by Synty, the scene consists of roughly 4500 game objects. (aside from particle systems, camera, and lights)

At the current stage, it sets up this PlayCanvas scene with 4500 templates in roughly 20 minutes.

The video has been sped up by 10x to not bore you to sleep.

Let me know what you think.

Unity to PlayCanvas Assets import plugin POC

3 Likes

Nice!
Maybe you could use REST API to import assets

1 Like

This is seriously impressive. Nice work! :rocket:

Do you have any plans to open source the tool? Did you make it for fun or do you have a specific use case planned for it?

1 Like

Thanks for your kind words, Will.

I mainly made it for fun but I also had a very specific use case in mind, I wanted to translate Unity scenes into PlayCanvas and also explore PlayCanvas editor APIs while at it.

I intend to improve it and polish it more before I think about either making it open-source or releasing it as a paid plugin.

2 Likes