Tasharen Entertainment Forum
Support => TNet 3 Support => Topic started by: Voxel on July 14, 2013, 04:02:32 PM
-
Hi,
This is probably something I am not understanding, but I though TNObject automatically assigns a unique ID number to itself.
For example I have a TNObject in a child of a parent that is being spawned using TNet. I have a script which has an @RFC in the child object that the TNObject is attached to.
Is this right?
Thanks!
-
TNObject only receives a unique ID if it's instantiated using TNManager.Create(prefab). If you use GameObject.Instantiate or just attach a script, it won't have a unique ID.
-
The TNObject is in a child of the gameobject that is instantiated by TNManager.Create(prefab) - Is it only TNObjects in the root of the instantiated object that are assigned ID numbers? Or should all TNObjects that are part of the TNManager.Create instantiated gameobject be assigned unique ID numbers?
-
Child TNObjects currently don't get their own ID, and instead use the parent's ID.
-
Ahhh, OK, so if I leave the ID number of the child TNObject as 0, it will show as zero but will be still accessible as normal?
-
Yup.