Hi there,
I'm developing a game in which players outfit vehicles with guns and use them in arena combat. I spawn the vehicle using TNManager.CreateEx(), which assigns it an ID, then load in weapons into slots according to how the player placed them. Each moving part has a TNObject set to 0, and uses the core vehicle as its TNObject.mParent.
1) It does not seem possible to assign TNObject id's manually. Doing this only seemed to change the TNObject.mParent ID.
2) After the vehicle and weapons are generated on client and host, the client throws an exception similar to the following, related to updating a turret's rotation: "Unable to execute function with ID of '23'. Make sure there is a script that can receive this call." This happens often, but not all the time, and always just after the debug log that suggests that the vehicle components have all been created client-side.
3) When the weapon components are all accounted for and there is no error, they all share the same rotation and fire at the same time. This is not my intent, they should operate independently of each other. I suppose they are all getting the packet since they are instances of the same prefab, and that TNet is somehow broadcasting the packet to all nested TNObjects.
I want to know: how can I manually assign and register unique IDs at runtime? This model that groups nested TNObjects and only utilizes the parent is slowing my development progress down. All guns of the same type are linked in a buggy way, and those execution exceptions are seemingly related as well.
TNet is a great product, such an improvement over Unity's native support. I hope that I can resolve this problem soon. Thank you in advance for your help.