- Home /
Tilemap loading
Hi, I am currently experimenting with creating a tilebased game world. for this I created a big level using the Unity Tilemapping System.
In order to avoid having to load the entire level at once, I only would like to load the tiles of the tilemap which are surrouding the player. Unfortunately I haven't found any tutorials or hints on how to achieve this. Does anyone have some sources or hints for me ?
Thx
Answer by b4guw1x · Sep 15, 2020 at 08:57 PM
Hi, i think you can use something like that
public GameObject tilemapPart1;
public GameObject tilemapPart2;
public GameObject tilemapPart3;
void update(){
if(player.transform.position.x > 5){
tilemapPart1.setActive(true);
tilemapPart2.setActive(false);
}
and you can create gameObjects in inspector, attach the tilemap parts as a child, and attach that game object to the code.
Your answer
Follow this Question
Related Questions
How to check tile flag in IF statement? 0 Answers
How can I modify the sprite of a particular Scriptable Tile in a Tilemap? 2 Answers
How to get adjcent tiles (horizontal or vertical) in an isometric tilemap ? 1 Answer
Get Specific Tile - Unity3D 0 Answers
Set the Tile Palette's 'Active Tilemap' value via code 0 Answers