- Home /
"Ambiguous Reference 'Label'" Errors, WebGL
Hello,
I'm in the process of converting an older project to Unity 5, and exporting it as WebGL. This may bring to light other issues, but the bulk of my compilation errors are similar to the following:
"Assets/Scripts/AssessmentControl.js(264,34): BCE0004: Ambiguous reference 'Label': UnityEngine.GUI.Label(UnityEngine.Rect, UnityEngine.GUIContent), UnityEngine.GUI.Label(UnityEngine.Rect, UnityEngine.Texture), UnityEngine.GUI.Label(UnityEngine.Rect, String)."
That line in particular looks like this:
GUI.Label(Rect((Screen.width/2)-164,(Screen.height/2)-156,352,76), preanswer[0]);
Unfortunately I cannot convert to the new GUI system, but it is my understanding that the legacy still functions. Any help is greatly appreciated, thanks in advance!
Pat
Answer by bayerly · Aug 04, 2015 at 11:45 PM
Solved this - it has to do with using "new Array();" with WebGL builds. I used another method and resolved the issue.
Your answer
