simple solution to scroll a tilemap in unity.
a lot of forums and videos have tried discussing this one particular problem - Scrolling a tilemap that you created and making a scrolling background type of effect.
simple method of soing this is by creating a script where you move the background ( or tilemap) unitl a point where the background resets to where it started.
follow this :
- open https://github.com/ameed2147/unitytooots/blob/main/bagscr.cs and copy the code.
- attach the script to the grid ( not the tilemap ).
- click on the main camera to find out the starting and ending points and identify them. ( check images https://github.com/ameed2147/unitytooots/blob/main/example%20values.png and https://github.com/ameed2147/unitytooots/blob/main/locations.png for reference )
- click on play.
- adjoin multiple grids and attach the same script, change the values accordingly and youve got a scrolling tilemap background.
- refer https://github.com/ameed2147/unitytooots/blob/main/scroll%20example.gif .