Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags
(+1)

I figured it out. You have to select all the image layers in the .tmx map, drag and drop SpritesLitDefault on all of them as Material, then set Target Sorting Layers to the correct one. Then add a 2D Point Light and set Target Sorting Layers to the right one as well! Working great.

Thanks again! 

Hi there, Christopher. I'm glad you got it working. BTW, I recommend you make the assignment of material and sorting layer part of your pipeline through a custom importer. That will save you from having to make any additional changes to your map prefabs after they are imported by ST2U.

You can see and example of a custom importer in action in this repository. It will take a little bit of code on your part to get what you want but it's really nice when your maps "just work" automatically. :)

I'm running into the same issue as Christopher, but I cannot fix it manually as he did because ST2U resets all of my materials back to default every time I reload Unity. I'm attempting to set up a custom importer as you suggested, but so far as I can tell, tilemap renderers cannot be found via getcomponent. How would you suggest changing the material of each tilemap renderer? Or even just a way to make ST2U stop changing my materials would be very helpful! Thanks!

Hi there, Mixxy92. I'm finding that when I have my project set up to use the LWRP with a 2D Renderer that the all Tilemap Renderers and Sprite Renderers are automatically using the Sprite-Lit-Default material. Are you not getting that? (I'm using 2019.2.6f1 btw)

You know, its the strangest thing. I made a custom importer but had literally no code in the importer. But when I changed the tmx files to use the (empty) custom importer, they all changed over to the sprite-lit-default for whatever reason. I can't explain it but as long as it continues working I'm content with it!

(+1)

BTW, in the Project Settings for SuperTiled2Unity you can assign the default material that you want all your Tilemap and Sprite renderers to use so for most people this will be the easiest/best way to use a custom material.

If you want sometime a bit more complicated like, say, different materials for different Tiled layers then you'll want to use a custom importer.

Hey! I would suggest after applying the proper lighting to your .tmx map, from your Inspector, drag the imported Tiled Map into a folder in Assets as a Prefab. This worked for me pretty well, but I'm sure Seanba's suggestion is better! 😊Can't wait for a release soon. Good luck everyone.