Search Unity

Question Addressables Event Viewer

Discussion in 'Localization Tools' started by Gamrek, Jan 10, 2022.

  1. Gamrek

    Gamrek

    Joined:
    Sep 28, 2010
    Posts:
    164
    Hello all,

    I am new to this localisation package and I want to ask if it is normal to have many addressable event triggered after using this package? I used to only have a few event before the localisation package. But now I have more than 50 events in a single scene. I just wonder if this is normal to have this much? And what should I look out for when it come to memory management? This is what it looks like now in one of the scene:

    Screenshot 2022-01-10 at 10.10.04.png

    Thanks.
     
    Symgy likes this.
  2. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,297
    Localization uses Addressables so it will generate events. Loading locales, Loading tables, fetching strings, etc, are all addressable events. Do you have a lot of localized content in your scene?
    The localization package will handle the loading and unloading of tables and assets so you should not need to look out for anything in particular. If you are using custom scripts to access localization then you just need to make sure you release any operations that you have called Acquire on or they will be garbage collected.
     
  3. Gamrek

    Gamrek

    Joined:
    Sep 28, 2010
    Posts:
    164
    Thanks! I use quite a few LocalizedString variable and use "GetLocalizedString" methods to get some translations at runtime. Is that mean I will need to release them myself?

    One other thing, there is one or two times I need to use "LocalizationSettings.StringDatabase.GetTableAsync", does that mean I need to release that too?
     
  4. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,297
    We automatically release the operations after they have been completed so you only need to call Acquire if you plan to hold onto the operation after its completion. Only call Release if you have called Acquire at some point or it may cause the asset to be released whilst it is still in use. If you have not called Acquire then you dont need to call Release.