Tasharen Entertainment Forum

Support => TNet 3 Support => Topic started by: Voxel on July 22, 2013, 10:26:02 AM

Title: Disconnecting from host while level loads
Post by: Voxel on July 22, 2013, 10:26:02 AM
Hi,

I have a level that is built procedurally, if I choose to build a large world that takes about 5 seconds to build (especially in the Game Window inside Unity), I get disconnected. Is there was way to keep the connection alive?

Thanks.
Title: Re: Disconnecting from host while level loads
Post by: ArenMook on July 22, 2013, 01:08:28 PM
It takes 10 seconds of inactivity for the connection to be considered "dead", so I am guessing it's more than 5 seconds? In either case you can change that. Line 320 in TNGameServer.
Title: Re: Disconnecting from host while level loads
Post by: matt.va on July 22, 2013, 09:48:37 PM
Hi,

I have a level that is built procedurally, if I choose to build a large world that takes about 5 seconds to build (especially in the Game Window inside Unity), I get disconnected. Is there was way to keep the connection alive?

Thanks.

hehe, i'm not the only one looking for the solution.
There are situation where it requires a longer timeout,e.g pause or loading scenes. And short timeout during gameplay.
Would be nice if there is an option to parameterize it.
Title: Re: Disconnecting from host while level loads
Post by: ArenMook on July 23, 2013, 04:29:14 AM
Agreed, I will add a function for it.
Title: Re: Disconnecting from host while level loads
Post by: ArenMook on July 23, 2013, 04:48:45 AM
I've added it to the Pro version, so you will see it in the next public release: TNManager.SetTimeout(int seconds). Set it to something large like 120 (for 2 minutes) before loading a level, then back to 10 after you finish loading it.
Title: Re: Disconnecting from host while level loads
Post by: Voxel on July 23, 2013, 07:14:59 AM
Brilliant! Thanks ArenMook!