Author Topic: Delay Objects Loading  (Read 1889 times)

voncarp

  • Jr. Member
  • **
  • Thank You
  • -Given: 13
  • -Receive: 2
  • Posts: 91
    • View Profile
Delay Objects Loading
« on: November 14, 2014, 07:46:40 PM »
I have a pretty good size map that takes a second or two to load up.  When I join a game as a client, I'll have objects already in scene from the host that are searching for some objects that haven't been loaded yet, leading to some nulls.

Is there a way to delay loading the persistent items until requested?

Thanks.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Delay Objects Loading
« Reply #1 on: November 15, 2014, 04:43:43 PM »
  1. IEnumerator Start()
  2. {
  3.     while (TNManager.isJoiningChannel) yield return null;
  4.     //.. do whatever
  5. }