Playmaker Forum

PlayMaker Updates & Downloads => Share New Actions => Topic started by: DanielThomas on March 09, 2018, 03:18:59 AM

Title: Unity Tilemap Actions
Post by: DanielThomas on March 09, 2018, 03:18:59 AM
I share some of my Unity tilemap actions I made and use for my project.

- Tilemap.SetTile (updated 2018-03-10)
- Tilemap.GetTile (added 2018-03-10)
- GridLayout.CellToWorld (updated 2018-03-10)
- GridLayout.WorldToCell (updated 2018-03-10)

Thanks to djaydino for helping out!
I'll add more as I go. Any tweaking and suggestions are welcome.
(http://www.danielthomasart.com/Uploads/Images/2DTilemap.gif)
Title: Re: Unity Tilemap Actions
Post by: djaydino on March 12, 2018, 12:51:24 AM
Hi.
Thx for these, i will check them out.

Can i place them on the Ecosystem (https://hutonggames.fogbugz.com/default.asp?W1181)?
Title: Re: Unity Tilemap Actions
Post by: DanielThomas on March 12, 2018, 07:04:55 AM
@djaydino Of course! Let me know if you find something strange in them.
Title: Re: Unity Tilemap Actions
Post by: craigz on May 02, 2019, 03:14:29 PM
Oh gosh! These are wonderful! :D

Do you happen to know if setting to none would make it empty? And then (theoretically) update a grid collider?

Can someone do a quick run down of how these actions work together?

Then get these suckers on Ecosystem haha :D

Thanks!

-craigz
Title: Re: Unity Tilemap Actions
Post by: DanielThomas on May 02, 2019, 04:30:32 PM
Not sure, it should work like Tilemap.SetTile does, but it sounds like it would work setting it to null.

Use the 'world to cell' if you have a world position and want to get the cell/tile position. I used it when I wanted to get a tile where the player stod on.

'Cell to world' is obviously the opposite, could be used if you had a teleporter tile position and wanted to world coordinates to set player position.

Set and get tile does what you would expect.
Title: Re: Unity Tilemap Actions
Post by: craigz on May 03, 2019, 03:04:47 AM
Excellent, thank you :) I was able to get it working pretty well.

I did modify a couple of the actions so a user can target a game object variable and automatically get the tilemap component.

Only usecase I can't quite figure out, is how to make a cell disappear when it's collided with or when a trigger object hits it. Since the point of collision is always outside of that actual cells range  :o