Pyxel Edit first impression and importer.

Categories: Editor Script, Pyxel Edit, Unity

I bought Pyxel Edit a couple of day ago (9$ + 1$), as I found it was mention as a very good tile editor on multiple indie game dev blogs.
So, getting started with it, without reading a single letter, wasn’t working 😉 But after a few minutes reading the small getting startet tutorial and watching the video, I was ready to go.
Making new tiles, placing them and exporting was so easy.

Pyxel Editor Screenshot
Pyxel Editor Screenshot

Well, having made a small test level in Pyxel Edit, I had to see if I could write a small importer for unity to make use of this new wonderful tool. I had newer written an editor script for unity before, and did have a lot of problems with references to the sprites I generated in the script… They did not exsist after the script exitede! :/ After a day of googling, asking in the unity forum, installing IRC and asking in the channel #unity3d without anyone being able to help, I did figure it out myself.

I had to import the sprites in unity as I normaly would, so they exsisted and would be referencable from the script, this I could do by loading them via Resources.LoadAll<Sprite>(name). The other problem was that all the tiles was clones of the original created game object and not the created prefab? Well that turned out to be simple to solve. All I had to do, was to use PrefabUtility.InstantiatePrefab instead of the normal Instantiate function, and everything worked 🙂
It was wonderful to finally see a level show up in unity that was created in an external editor.

Unity Pyexl Importer Screenshot
Unity PyxelImporter Screenshot

I have continued to modify the editor script to make it more useful i.e. not to overwrite existing prefabs, as I want to be able to add colliders and scripts to the different prefabs without them being overwritten every time I update the tileset.

Use and modify the Pyxel Importer script as you want (Link to script), if you make any improvements to it, please let me know, so I can add the updated version to this post.

Two minor details about Pyexl Editor though

  1. I can’t figure out how to detach a tile AND delete the drawing in one operation, for now I have to detach a tile by Ctrl+right clicking and then use the the eraser or the selection tool, mark it and delete.
  2. It’s not possible to have multiple canvases per doc, so you would be able to create multiple levels using the same tileset without manually having to synchronize the tilesets between the different canvases. The developer know this, and are open to add this feature in the future.

Conclusion, I love Pyxel Edit! So much that I bought another copy today ($20) 🙂 It has made it possible for me to start making tile based games, as I want them.

So now, go and buy Pyxel Edit and make games.

– Henning


Leave a Reply

Your email address will not be published. Required fields are marked *