Simple C# string concatenation throws JS syntax error in WebGL player

Using the WebGL player, I get a runtime syntax error when attempting to concatenate static strings. If the strings are non-static, then the there is no runtime error and the correct result gets logged. Using String.Concat didn’t work either – same error. All this time, everything works just fine in the Unity editor.

Is there a way to look at the intermediate output of IL2CPP?

Repro:

using UnityEngine;
using System;
using System.Collections;

public class SceneSetup : MonoBehaviour {
public static string a = “a”;
public static string b = “b”;

void Start()
{
Debug.Log (a + b);
}

Hi all,
I got pretty much the same problem but in worse : string concatenation does not work even if the string are not static.
Testing stuff I cam to this code that does not work.
See the javascript console output below…

Please help…

string basepath = @“StreamingAssets/Models/”;
string asseturl1 = string.Copy(Application.absoluteURL);
char[ ] jimcarray = asseturl1.ToCharArray();
string asseturl = new string(jimcarray);
string asseturl4 = string.Concat(asseturl, basepath);
string asseturl5 = string.Concat(asseturl4, m_AssetName);
Debug.Log(“asseturl :” + asseturl5);

Console output :
asseturl :http://192.168.1.8/correctpath/

the concatenation does not work at all, whatever strange workaround I use… any hint, someone ?

Damn, please report those bugs!

It’s epic bug…temporary solution: