Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tilemap renderer cannot be refreshed after deletion #378

Open
Himil88 opened this issue Nov 15, 2023 · 2 comments
Open

Tilemap renderer cannot be refreshed after deletion #378

Himil88 opened this issue Nov 15, 2023 · 2 comments

Comments

@Himil88
Copy link

Himil88 commented Nov 15, 2023

hello.

I wrote a script to delete a tile at a specific location at runtime.

The deletion and tilemap collider refresh worked fine, and I even saw it in the editor.

However, I was having an issue with the renderer not automatically refreshing, leaving the tiles in place.

I tried using Tilemap.RefreshAllTiles(), Tilemap.RefreshTile, and turning the component off and on via script to update the renderer that wasn't cleared, but I couldn't resolve this issue.

The only way was to turn the component off and on directly in the editor.

Unity version: 2023.2.0b16
2D Tilemap Extra version: 4.0.2
Code for delete a tile: Tilemap.SetTile(position, null);

@ChuanXin-Unity
Copy link
Collaborator

Sorry about this issue! This sounds like a bug. We will investigate this!

If you could file a bug with the Unity Bug Reporter that would help, thanks!

@Himil88
Copy link
Author

Himil88 commented Nov 15, 2023

Thank you for answer.

After posting a question and searching for a few more hours, I found the problem and solution.

I think the problem occurred when I adjusted the tilemap outside the camera and then moved the tilemap back into the camera.

Change DetectChunkCullingBounds to Manual, Increasing the range of ChunkCullingBounds solved the problem.

This may be due to my lack of understanding, but the problem may be that the renderer is not automatically refreshed when the tile map is re-rendered on the camera even though DetectChunkCullingBounds is set to Auto.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants