Tasharen Entertainment Forum

Support => TNet 3 Support => Topic started by: Voxel on July 14, 2013, 04:02:32 PM

Title: TNObject ID not assigning a unique ID number to itself
Post 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!
Title: Re: TNObject ID not assigning a unique ID number to itself
Post by: ArenMook on July 14, 2013, 07:08:51 PM
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.
Title: Re: TNObject ID not assigning a unique ID number to itself
Post by: Voxel on July 15, 2013, 05:16:07 AM
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?

Title: Re: TNObject ID not assigning a unique ID number to itself
Post by: ArenMook on July 15, 2013, 06:50:11 AM
Child TNObjects currently don't get their own ID, and instead use the parent's ID.
Title: Re: TNObject ID not assigning a unique ID number to itself
Post by: Voxel on July 15, 2013, 07:03:22 AM
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?
Title: Re: TNObject ID not assigning a unique ID number to itself
Post by: ArenMook on July 15, 2013, 07:07:05 PM
Yup.