discord / gamesdk-and-dispatch

Public issue tracker for the Discord Game SDK and Dispatch
22 stars 7 forks source link

Cannot use SDK while developing inside WSL 2 #43

Open Ponjimon opened 4 years ago

Ponjimon commented 4 years ago

Currently, it's not really possible to use GameSDK while developing inside Windows' WSL (or WSL 2 for that matter).

I think that's because the SDK tries to reach Discord using 127.0.0.1 but for obvious reasons, Discord is not available at that host as that's WSL itself.

One possible solution would be to make the SDK reach another IP. Most likely, this would be the Host IP that is used for WSL.

One could get that IP from within WSL using

tail -1 /etc/resolv.conf | cut -d' ' -f2