Search Unity

Unable to display Localization WebGL Build in browser

Discussion in 'Web' started by vket2, Aug 26, 2022.

  1. vket2

    vket2

    Joined:
    Apr 7, 2022
    Posts:
    3
    【What we want to achieve】
    I want to display a WebGL Build screen in a browser using Localization.

    【Version】
    Unity2020.3.8f1LTS
    Localization1.3.2

    【Contents】
    I cannot display WebGL Build using Localization in a browser.
    How to solve this problem?

    (1)When I start WebGL Build with Localization in a browser, the following error message appears on the browser and I cannot display the screen.

    I get the following error message:
    「do you wish to make the asset the active localization settings?

    The active localization settings will be included into any builds and preloaded at the start this can be changed at edit/project settings/localization」

    (2)If you delete the LocalizationSettings file, you will be able to see

    (3)In LocalizationSettings
    LocaleSelectors > Command Line Artumetnt
    Change the following to

    -language=

    -language=en

    The error message will change to
    「an error occurred running the uinty content on this page
    see your browser javascript console for more into
    the error was abort101 at error」

    【UnityEditor】
    On UnityEditor, localization switching works normally, but the following log message appears
    「Locales PreloadOperation has not been initialized, can not return the available locales.
    LocalesProvider:get_Locales ()
    VketAvatarMaker.LocalizationController:Localization () (at Assets/VketAvatarMaker/Scripts/Common/LocalizationController.cs:39)
    VketAvatarMaker.LocalizationController:b__1_0 (long) (at Assets/VketAvatarMaker/Scripts/Common/LocalizationController.cs:30)
    UniRx.Observer/Subscribe`1:OnNext (long) (at Library/PackageCache/com.neuecc.unirx@284d5c50d3/Observer.cs:165)
    UniRx.Operators.TimerObservable/Timer:OnNext () (at Library/PackageCache/com.neuecc.unirx@284d5c50d3/Operators/Timer.cs:97)
    UniRx.Operators.TimerObservable/<>c__DisplayClass6_2:b__1 () (at Library/PackageCache/com.neuecc.unirx@284d5c50d3/Operators/Timer.cs:62)
    UniRx.MainThreadDispatcher:UnsafeSend (System.Action) (at Library/PackageCache/com.neuecc.unirx@284d5c50d3/UnityEngineBridge/MainThreadDispatcher.cs:269)
    UniRx.Scheduler/MainThreadScheduler/d__2:MoveNext () (at Library/PackageCache/com.neuecc.unirx@284d5c50d3/UnityEngineBridge/MainThreadScheduler.cs:102)
    UnityEngine.SetupCoroutine:InvokeMoveNext (System.Collections.IEnumerator,intptr)」

    Translated with DeepL

    【実現したい事】
    Localizationを使用してWebGL Buildをブラウザで画面を表示させたいです

    【Version】
    Unity2020.3.8f1LTS
    Localization1.3.2

    【内容】
    Localizationを使用してWebGL Buildをブラウザで画面が表示できない
    対応方法を教えて下さい

    LocalizationのWebGL Buildをブラウザで起動時にブラウザ上で下記エラーが出力されて画面が表示できません
    「do you wish to make the asset the active localization settings?
    the active localizaation settings will be included into any builds and preloaded at the start this can be changed at edit/project settings/localization」

    LocalizationSettingsファイルを削除すれば表示可能です

    LocalizationSettings内の
    LocaleSelectors > Command Line Artumetnt
    下記に変更すると
    -language=

    -language=ja

    エラー内容は下記に変化します
    「an error occurred running the uinty content on this page
    see your browser javascript console for more into
    the error was abort101 at error」

    【UnityEditor】
    UnityEditor上では正常にローカライズ切替が動作しますが、下記ログが表示されます
    「Locales PreloadOperation has not been initialized, can not return the available locales.
    UnityEngine.Localization.Settings.LocalesProvider:get_Locales ()
    VketAvatarMaker.LocalizationController:Localization () (at Assets/VketAvatarMaker/Scripts/Common/LocalizationController.cs:39)
    VketAvatarMaker.LocalizationController:<Awake>b__1_0 (long) (at Assets/VketAvatarMaker/Scripts/Common/LocalizationController.cs:30)
    UniRx.Observer/Subscribe`1<long>:OnNext (long) (at Library/PackageCache/com.neuecc.unirx@284d5c50d3/Observer.cs:165)
    UniRx.Operators.TimerObservable/Timer:OnNext () (at Library/PackageCache/com.neuecc.unirx@284d5c50d3/Operators/Timer.cs:97)
    UniRx.Operators.TimerObservable/<>c__DisplayClass6_2:<SubscribeCore>b__1 () (at Library/PackageCache/com.neuecc.unirx@284d5c50d3/Operators/Timer.cs:62)
    UniRx.MainThreadDispatcher:UnsafeSend (System.Action) (at Library/PackageCache/com.neuecc.unirx@284d5c50d3/UnityEngineBridge/MainThreadDispatcher.cs:269)
    UniRx.Scheduler/MainThreadScheduler/<DelayAction>d__2:MoveNext () (at Library/PackageCache/com.neuecc.unirx@284d5c50d3/UnityEngineBridge/MainThreadScheduler.cs:102)
    UnityEngine.SetupCoroutine:InvokeMoveNext (System.Collections.IEnumerator,intptr)」
     

    Attached Files:

  2. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,291
  3. vket2

    vket2

    Joined:
    Apr 7, 2022
    Posts:
    3
    Thanks for letting me know.

    ■I did the operation with the Default Build Script, but I get a squash error.
    ・I have done the pull down content of the screenshot.
    ・I confirmed the operation with the difference of the file of the screenshot.

    ■Please let me know how to deal with this.

    image (5).png image (1).png image (4).png image (3).png


     
  4. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,291
  5. vket2

    vket2

    Joined:
    Apr 7, 2022
    Posts:
    3
    Thank you.

    Uploading build files to the server
    Confirming the operation on Chrome screen.
    The log when the screen can be displayed normally is before localization.

    ■We share the logs of the following three patterns.
    ・(Chrome) Log when the screen can be displayed normally
    ・(Chrome) Logs when the screen cannot be displayed due to an error
    ・(Edge) Log when the screen cannot be displayed due to an error

    Translated

     
  6. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    8,291