- Home /
UNET - Send update positions at a lower level than using NetworkTransform?
I'm learning how the new networking works and one of the things I really don't understand is how to send an update state message, such as for position, over the network to a specific GameObject (given that the GameObject has been instantiated with Network Instantiate and had a NetworkIdentity). I want to know how to do this without using the built-in components in order to understand UNET at a lower level.
Lets say I have a client connected to a server and the server is Network Instantiating ball prefabs that have a NetworkIdentity component, Transform component, and a simple script that adjusts the position of the ball on update based on a gravity variable.
What would I put in the simple script that could efficiently say "If I am server-side, I should send a Vector3 equal to transform.position to a client-function that updates transform.position @ the corresponding ball with my NetworkIdentity." I feel like their should be a NetworkIdentity.sendToClients(parameters), but that could just be because I'm used to RPC-ing. I'm pretty sure registerHandler and sendUnreliable, but having to allocate handler ids to each ball seems like too much for this simple task.
Your answer
Follow this Question
Related Questions
Can I delay the instantiation of the network objects? 1 Answer
networkview.RPC not accessible in unity 5.4 1 Answer
How to load all character previously in game when new player joins 0 Answers
How to sync position only one time, using Photon Networking 1 Answer
[uNet] Need help Converting From Unity Network to uNet 0 Answers