Author Topic: TNObject no parent found?  (Read 1619 times)

Bill.Smock

  • Newbie
  • *
  • Thank You
  • -Given: 6
  • -Receive: 2
  • Posts: 19
    • View Profile
TNObject no parent found?
« on: June 22, 2016, 09:07:55 PM »
I have a prefab with TNObject script on it, the ID is set to 0.  When I instantiate the object, no parent is found in the TNObject Start() function (transform.parent = null).  Not sure what to do, it's on the top of the hierarchy on the prefab. 

One thing to note - I am instantiating the object after a new scene loads in the Start() routine of an object that is already in the scene.  Could this be causing it?  If so, how??

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: TNObject no parent found?
« Reply #1 on: June 24, 2016, 01:07:39 AM »
You should wait for the join operation to complete before creating objects or sending RFCs.
  1. IEnumerator Start ()
  2. {
  3.     if (TNManager.isJoiningChannel) yield return null;
  4.     // do stuff
  5. }