Search Unity

Bug powerPreference empty loader.js

Discussion in 'Web' started by koelekikkers, May 11, 2023.

  1. koelekikkers

    koelekikkers

    Joined:
    Jan 8, 2020
    Posts:
    1
    When I try to build my WebGL game in version 2021.3.24f1 I get this error:

    Code (Boo):
    1. Building C:\Users\wridz\Desktop\DigibaitBuildFolder\Build\DigibaitBuildFolder.loader.js failed with output:
    2.  
    3. C:\Program Files\Unity\Hub\Editor\2021.3.24f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\Preprocess.js:79
    4.     throw uglified.error;
    5.     ^
    6. JS_Parse_Error [SyntaxError]: Unexpected token: punc «,»
    7.     at JS_Parse_Error.get (eval at <anonymous> (C:\Program Files\Unity\Hub\Editor\2021.3.24f1\Editor\Data\PlaybackEngines\WebGLSupport\BuildTools\uglify-js\tools\node.js:18:1), <anonymous>:61:23)
    8.     at formatError (internal/util/inspect.js:1085:38)
    9.     at formatRaw (internal/util/inspect.js:892:14)
    10.     at formatValue (internal/util/inspect.js:746:10)
    11.     at inspect (internal/util/inspect.js:287:10)
    12.     at afterInspector (internal/errors.js:698:14) {
    13.   filename: '0',
    14.   line: 56,
    15.   col: 23,
    16.   pos: 1951
    17. }
    18. UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
    when I open the DigibaitBuildFolder.loader.js there is indeed a error on line 56 where the option for powerPreference is empty. I checked the setting in the player settings and also changed it around but the bug remains.

    it does work in Unity 2020.3.14f1

    EDIT: also, just entering manually and pressing build again doesn't seem to work
     
    Last edited: May 11, 2023