Skip to content

Commit

Permalink
Merge pull request #24 from reown-com/fix/webgl-editor-not-working
Browse files Browse the repository at this point in the history
fix: AppKit not working in the Editor when the target platform is set to WebGL
  • Loading branch information
skibitsky authored Nov 28, 2024
2 parents 8e8127d + 190757d commit af94d73
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/Reown.AppKit.Unity/Plugins/AppKit.jslib
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,8 @@ mergeInto(LibraryManager.library, {
WagmiWatchChainId: function (callbackPtr) {
_appKitConfig.wagmiCore.watchChainId(_appKitConfig.config, {
onChange(data) {
{{{makeDynCall('vi', 'callbackPtr')}}}(data);
const dataStr = stringToNewUTF8(SerializeJson(data));
{{{makeDynCall('vi', 'callbackPtr')}}}(dataStr);
_free(dataStr);
}
});
Expand Down
2 changes: 1 addition & 1 deletion src/Reown.Sign.Unity/Runtime/UnityRelayUrlBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ protected override bool TryGetPackageName(out string packageName)

protected override bool TryGetOrigin(out string origin)
{
#if UNITY_WEBGL
#if UNITY_WEBGL && !UNITY_EDITOR
origin = Application.identifier;
return true;
#else
Expand Down

0 comments on commit af94d73

Please sign in to comment.