playMaker

Author Topic: Unity Tilemap Actions  (Read 7020 times)

DanielThomas

  • Beta Group
  • Full Member
  • *
  • Posts: 150
Unity Tilemap Actions
« 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.
« Last Edit: March 09, 2018, 07:08:06 PM by DanielThomas »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7614
    • jinxtergames
Re: Unity Tilemap Actions
« Reply #1 on: March 12, 2018, 03:51:24 AM »
Hi.
Thx for these, i will check them out.

Can i place them on the Ecosystem?

DanielThomas

  • Beta Group
  • Full Member
  • *
  • Posts: 150
Re: Unity Tilemap Actions
« Reply #2 on: March 12, 2018, 10:04:55 AM »
@djaydino Of course! Let me know if you find something strange in them.

craigz

  • Beta Group
  • Full Member
  • *
  • Posts: 234
    • Haven Made
Re: Unity Tilemap Actions
« Reply #3 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
« Last Edit: May 02, 2019, 06:20:46 PM by craigz »

DanielThomas

  • Beta Group
  • Full Member
  • *
  • Posts: 150
Re: Unity Tilemap Actions
« Reply #4 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.

craigz

  • Beta Group
  • Full Member
  • *
  • Posts: 234
    • Haven Made
Re: Unity Tilemap Actions
« Reply #5 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

Plancksize

  • Beta Group
  • Junior Playmaker
  • *
  • Posts: 75
Re: Unity Tilemap Actions
« Reply #6 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 ;)

10high

  • Playmaker Newbie
  • *
  • Posts: 33
    • Cult Manager - Google Play
Re: Unity Tilemap Actions
« Reply #7 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?
Cult Manager