Tasharen Entertainment Forum

Support => TNet 3 Support => Topic started by: Manmax75 on April 18, 2014, 06:03:47 AM

Title: Networking Initialization
Post by: Manmax75 on April 18, 2014, 06:03:47 AM
Hey there, is there a way to know when all game objects have been instantiated onto the client on first join?
I have a function that needs to be run on the client but it requires that all objects already exist in the scene. I currently have it being called at Start() but this seems to call it before the objects are created due to the delay caused by packets in transit.

Cheers.
Title: Re: Networking Initialization
Post by: djray2k on April 18, 2014, 08:24:04 AM
Assuming you have a way to tie a game object to a network player, you could loop through all players and check to see if they have an created object yet. You could also 'pause' the game until all the objects have been created and then continue your start function.
Title: Re: Networking Initialization
Post by: ArenMook on April 18, 2014, 05:35:39 PM
All calls that went through TNManager.Create are guaranteed to already be instantiated when OnNetworkJoinChannel is sent.
Title: Re: Networking Initialization
Post by: Manmax75 on April 18, 2014, 06:09:37 PM
Thankyou!