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. Dismiss Notice

Bug [GoogleSheets] PullCellData is never called on empty cells

Discussion in 'Localization Tools' started by Garrafote, Dec 7, 2020.

  1. Garrafote

    Garrafote

    Joined:
    Jun 13, 2013
    Posts:
    48
    Hi,

    On 0.9.0-preview I noticed that on GoogleSheets.MergePull there is a filter for empty cells when Calling columnMapping.PullCellData(), and as a result cells that are deleted from the spreadsheet are not updated back on unity. This will affect locale columns as well as custom metadata columns.

    GoogleSheets.MergePull:
    upload_2020-12-7_21-28-54.png
     
  2. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    7,846
    After this step, we run RemoveMissingEntries which removes entries that were not found(deleted from the sheet). Does this work for you?
     
  3. Garrafote

    Garrafote

    Joined:
    Jun 13, 2013
    Posts:
    48
    RemoveMissingEntries works if I delete the whole row from the sheet. This case is when I delete the value of a single cell but leave the row with the key data and all other columns untouched.


    For example, on the following sheet I deleted the values from "Portuguese.." and "Tags" columns:
    upload_2020-12-7_21-37-53.png

    In this case I would expect that the portuguese translation would be emptied from the table on unity and that I get a callback to clean my custom metadata for the Tags column but that doesn't happen due to the check on GoogleSheet.MergePull

    Since I'm using a modified version of the library I was able to fix the problem on my end. Here is my diff:
    upload_2020-12-7_21-42-27.png

    Edit:
    I understand that this is very unlikely to happen for locale columns but it would be a much more common case for custom columns.
     
    Last edited: Dec 7, 2020
  4. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    7,846
    Ah thanks. Nice spot. I created a bug for it https://issuetracker.unity3d.com/product/unity/issues/guid/LOC-134
     
    Garrafote likes this.