Tasharen Entertainment Forum
Support => TNet 3 Support => Topic started by: GabaLaba on October 03, 2017, 04:40:29 PM
-
Hello everyone,
I am having a strange issue with Network ID assignment on prefabs that are instantiated multiple times.
I have an object in my scene with a TN Object component attached that has the ID 42 (I have changed it to see if that would fix the problem and it didn't).
When I instantiate the prefab while the same prefab exists in that scene, I get this in my console [Gyazo Link & attached]: https://gyazo.com/b5a626dcaf1970e974068ad0438dcb3c
Not sure what I am doing wrong. It doesn't seem to be affecting anything yet, however I fear that it will cause problems in the future. Not really sure if that is the case as I am still quite new to TNet.
Thanks,
Gabe
-
You should use network ID of 0 on objects that are instantiated multiple times. This'll tell TNet to generate a unique ID for each instantiation.
You will run into problems with the same ID; RFCs won't know which object they're supposed to execute on.