Playmaker Forum

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

Title: Unity Tilemap Actions
Post by: DanielThomas on March 09, 2018, 05: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, 03: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, 10: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, 06: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, 07: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, 06: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
Title: Re: Unity Tilemap Actions
Post by: Plancksize on January 24, 2020, 12:20:48 PM
Hey, bit of a necro here, but this seems the only place I could find actions for tilemaps.

Is there any chance someone could help in making the "tilemap" field be used through an Object FSMvar?
Thank you ;)
Title: Re: Unity Tilemap Actions
Post by: 10high on August 11, 2021, 05:50:19 AM
Thanks for these, exactly what I needed.

I was wondering though if they were ever added to the ecosystem, because I couldn't find them there?

Also, I'm experiencing weird behavior. The actions work as intended but seem to remain active in the state (similar to an action with every frame enabled) and I currently have to use a "Send event" action to exit the state. I was wondering what might cause such behavior?