question

Dale Strickler avatar image
Dale Strickler asked

Debug Simulate network loss

I have a debug canvas in Unity that I can turn and off to see the internal status of the game and to force certain conditions for test purpose. I want to add a checkbox that allows me to 'disable the network'. I basically want to make all the PlayFab calls to fail so I can test how the game handles a loss of network.

I considered just setting our title ID to something like 0. But, I am not sure if that is the best idea.

Has anyone simulate network loss? If so how did you do it?

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

pfnathan avatar image
pfnathan answered

The best way to disable network connectivity is simply turning off your router or the network on your computer. Also, changing title ID to “0” is not a valid way to test your game. You should only use assigned Title IDs.

2 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Dale Strickler avatar image Dale Strickler commented ·

I did not like the id thing. I also don't like the pulling the network wire. I have so many other things running on my systems I often crash something. I can just block the PF address... it just seems like there should be a simple way to simulate this.

0 Likes 0 ·
pfnathan avatar image pfnathan ♦ commented ·

You could try using a proxy to block the IP addresses for AWS US West-2 (http://docs.aws.amazon.com/general/latest/gr/aws-ip-ranges.html). Please note that it's not something we directly support, though.

0 Likes 0 ·
cloudweight avatar image
cloudweight answered

Why not just disable the netywork adapter from Windows Control Panel? If you're on Windows 8 or Windows 10 you can simply click your WiFi signal and turn off the adapter from there or turn on airplane mode.

If you're on another OS you can just disconnect from the current WiFi you're on?

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.