Author Topic: referencing created object  (Read 3742 times)

derkoi

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 57
    • View Profile
referencing created object
« on: June 21, 2014, 09:28:26 AM »
Hi,

I'm trying to store a reference for a network instantiated gameobject. The other objects that are not networked I'm instantiating this way:

  1. myObject = (GameObject)Instantiate(myObjectPrefab, pos, rot);

What is the way to do the same but using TNManager.Create? I tried this but it threw an error:

  1. myObject = (GameObject)TNManager.Create(myObjectPrefab, pos, rot);

Thanks

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: referencing created object
« Reply #1 on: June 21, 2014, 05:35:22 PM »
TNManager.Create call does not execute immediately. Create call sends a message to the server, which will then create an object on all clients, not just your computer. If you want to pass data to your create call, look into this sticky post: http://www.tasharen.com/forum/index.php?topic=5416.0