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

Stale cache switching branches

Discussion in 'Localization Tools' started by SozoDev, Jul 6, 2021.

  1. SozoDev

    SozoDev

    Joined:
    Nov 15, 2016
    Posts:
    18
    Hi
    We've come across an issue using the localization package. Not sure how to exactly reproduce this but we saw it a couple of times now. We have a project set up in plasticSCM. The main- and dev branch both have the localization package installed in the project. The main branch's copy did not implement the translation work yet. So on dev we added the `localization string event` component to the prefabs and ui elements etc. When we switched back to main for other work we noticed while running the game that we get the missing translation error on some ui elements (which shouldn't even be enabled for translations yet). Turns out the prefab does not contain the `localization string event` component, but it is there in the inspector when running in play mode. Once we refreshed/reimported a couple of affected prefabs, the problem was fixed for that instance.

    Are you aware of cases like this? Thought it important to report this as it can corrupt our builds if we dont reimport our cache when switching branches (causing a big time delay).
     
  2. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    7,846
    That's very strange. Are the prefabs in addressables? It may be loading the old addressables build when you enter play mode.
    Try cleaning the addressables build when you update branch.
    There's nothing specific to localization that would cause this that I am aware of.
     
  3. SozoDev

    SozoDev

    Joined:
    Nov 15, 2016
    Posts:
    18
    Hi
    We are on unity 2019.4.25f1 with addressables v1.18.2. I don't believe the UI prefabs are part of the addressables - it's built with the main app. We mostly mark our different scenes and 3d assets as addressables.
    Your response gives me some direction to look into at least. I've done a reimport this morning but will keep an eye on it and try things with addressables package when the issue crops up again.
     
  4. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    7,846
    What is the addressables play mode set to?
    Screen Shot 2021-07-06 at 14.11.56.png

    If its set to use existing then that would likely explain the issue(using old asset bundles)
     
  5. PlaycorpEmad

    PlaycorpEmad

    Joined:
    Oct 31, 2019
    Posts:
    1
    I think something similar to this happens for me as well that the LocolizeStringEvent reference or LocalizedString field go missing however the component or the field shown on inspector.

    the localization version is the latest and I’m believe the addressable mode is using assetDatabase.

    I’ll keep my eyes on this issue, so far it only happens twice.
     
    karl_jones likes this.