Skip to content

Commit cd021b9

Browse files
committed
webgl fixes #20
1 parent ad0f446 commit cd021b9

File tree

23 files changed

+1636
-1267
lines changed

23 files changed

+1636
-1267
lines changed

Assets/UXF/Examples/1a_SpaceShuttle/SpaceShuttleExample.unity

Lines changed: 1256 additions & 1256 deletions
Large diffs are not rendered by default.

Assets/UXF/Scripts/DataHandling/HTTPPost.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public class HTTPPost : DataHandler
2626
[BasteRainGames.HideIf("httpBasicAuthentication", false)]
2727
public string username = "susan";
2828
[BasteRainGames.HideIf("httpBasicAuthentication", false)]
29-
public string password = "hello";
29+
public string password = "password";
3030

3131

3232
public override bool CheckIfRiskOfOverwrite(string experiment, string ppid, int sessionNum, string rootPath = "")

Assets/UXF/Scripts/Etc/Editor/UXFWizard.cs

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -142,21 +142,28 @@ public void OnGUI()
142142

143143
GUILayout.Label("WebGL", EditorStyles.boldLabel);
144144

145-
if (PlayerSettings.WebGL.template == "PROJECT:UXF WebGL")
145+
string expected;
146+
147+
#if UNITY_2020_1_OR_NEWER
148+
expected = "PROJECT:UXF WebGL 2020";
149+
#else
150+
expected = "PROJECT:UXF WebGL 2019";
151+
#endif
152+
153+
if (PlayerSettings.WebGL.template == expected)
146154
{
147-
EditorGUILayout.HelpBox("UXF WebGL template is set correctly.", MessageType.Info);
155+
EditorGUILayout.HelpBox("UXF WebGL template is set correctly. You may still need to enable WebGL in build settings.", MessageType.Info);
148156
}
149157
else
150158
{
151-
EditorGUILayout.HelpBox("UXF WebGL template is not selected as the WebGL Template in Player Settings.", MessageType.Warning);
159+
EditorGUILayout.HelpBox("Do you plan to run your experiment in a web browser? UXF WebGL template is not selected as the WebGL Template in Player Settings.", MessageType.Warning);
152160
if (GUILayout.Button("Fix"))
153161
{
154-
PlayerSettings.WebGL.template = "PROJECT:UXF WebGL";
162+
PlayerSettings.WebGL.template = expected;
155163
}
156164
}
157165

158166

159-
160167
EditorGUILayout.Separator();
161168
EditorGUILayout.HelpBox("To show this window again go to UXF -> Show setup wizard in the menubar.", MessageType.None);
162169

Assets/UXF/Scripts/Etc/Utilities.cs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,16 @@ public static class Utilities
1818
public static void UXFDebugLogErrorFormat(string format, params object[] args) { Debug.LogErrorFormat(UXFFormatString(format), args); }
1919

2020

21-
private static string UXFFormatString(string message) { return string.Format("[<b><color=#AD477C>UXF</color></b>] {0}", message); }
21+
private static string UXFFormatString(string message)
22+
{
23+
return string.Format(
24+
"{0} {1}",
25+
Application.platform != RuntimePlatform.WebGLPlayer ?
26+
"[<b><color=#AD477C>UXF</color></b>]" :
27+
"[UXF]",
28+
message
29+
);
30+
}
2231

2332
}
2433

Assets/UXF/VERSION.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.2.2
1+
2.2.3
File renamed without changes.
File renamed without changes.

Assets/WebGLTemplates/UXF WebGL/Template/style.css.meta renamed to Assets/WebGLTemplates/UXF WebGL 2019/Template/style.css.meta

File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)