Tasharen Entertainment Forum

Support => TNet 3 Support => Topic started by: derkoi on June 21, 2014, 09:28:26 AM

Title: referencing created object
Post by: derkoi 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
Title: Re: referencing created object
Post by: ArenMook 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