Tasharen Entertainment Forum
Support => TNet 3 Support => Topic started 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.
-
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.
-
All calls that went through TNManager.Create are guaranteed to already be instantiated when OnNetworkJoinChannel is sent.
-
Thankyou!