Skip to content

Commit 99aff36

Browse files
committed
chore: keep awake for webgl
1 parent 78514d1 commit 99aff36

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/Packages/Passport/Runtime/ThirdParty/Gree/Assets/Plugins/WebViewObject.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,12 @@ private static void delegateMessageReceived(string key, string message)
198198
}
199199
}
200200
#endif
201-
201+
#if UNITY_WEBGL && !UNITY_EDITOR
202+
void Awake()
203+
{
204+
DontDestroyOnLoad(this);
205+
}
206+
#endif
202207
public void handleMessage(string message)
203208
{
204209
var i = message.IndexOf(':', 0);

0 commit comments

Comments
 (0)