Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Question Updating Tilemap material properties triggers TilemapRenderer BuildChunkJob

Discussion in '2D' started by wengjx-, Sep 1, 2023.

  1. wengjx-

    wengjx-

    Joined:
    Oct 1, 2021
    Posts:
    21
    Hi,

    I am updating the material property values of a tilemap in runtime (tweening a value over 1 second), which would trigger TilemapRenderer BuildChunkJob. As the camera that we are using is perspective, it triggers quite a number of calls to the build chunk job and it's expensive on mobile devices.

    Is there anyway to update material property values of tilemap without triggering Build Chunk Job?

    Thank you
     
  2. ChuanXin

    ChuanXin

    Unity Technologies

    Joined:
    Apr 7, 2015
    Posts:
    1,068
    Hi, would it be possible to share the material property value changes you are making, so that we can check out this issue? Thanks!
     
  3. wengjx-

    wengjx-

    Joined:
    Oct 1, 2021
    Posts:
    21
    Hi ChuanXin,

    Any material property changes will trigger this issue. My team have submitted a bug report under performance: IN-53768

    I have tried using the 2D sample project, Happy Harvest, and change the material of the tilemap (GroundBase) to Material_Fire. Click on Run and start Profiler. Just constantly drag the Float variable slider in Material_Fire will trigger the BuildChunkJob. You can check for it under other worker threads.

    Additional Set Pass Calls is also added when changing the float variable.