Skip to content

Commit 1bdf007

Browse files
committed
webgl fixes
1 parent 2a8774e commit 1bdf007

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

Assets/UXF/Plugins/AWSJS.jslib

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
mergeInto(LibraryManager.library, {
22

33
DDB_Setup: function(region, identityPool, callbackGameObjectName) {
4+
5+
if (typeof unityInstance == "undefined") {
6+
throw "Cannot find unityInstance. Make sure you are using the UXF WebGL template."
7+
}
8+
49
AWS.config.region = Pointer_stringify(region);
510
AWS.config.credentials = new AWS.CognitoIdentityCredentials({
611
IdentityPoolId: Pointer_stringify(identityPool),

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

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,26 @@ public void OnGUI()
119119
}
120120
}
121121

122+
123+
EditorGUILayout.Separator();
124+
125+
GUILayout.Label("WebGL", EditorStyles.boldLabel);
126+
127+
if (PlayerSettings.WebGL.template == "PROJECT:UXF WebGL")
128+
{
129+
EditorGUILayout.HelpBox("UXF WebGL template is set correctly.", MessageType.Info);
130+
}
131+
else
132+
{
133+
EditorGUILayout.HelpBox("UXF WebGL template is not selected as the WebGL Template in Player Settings.", MessageType.Warning);
134+
if (GUILayout.Button("Fix"))
135+
{
136+
PlayerSettings.WebGL.template = "PROJECT:UXF WebGL";
137+
}
138+
}
139+
140+
141+
122142
EditorGUILayout.Separator();
123143
EditorGUILayout.HelpBox("To show this window again go to UXF -> Show setup wizard in the menubar.", MessageType.None);
124144

0 commit comments

Comments
 (0)