I am working on a 2player (1v1) game, online thanks to Unity’s native networking code and want to play an animation on a character for BOTH the host and the joiner. I searched around a little and read that I need to do it normally for the host, then use an RPC to send the updated info (saying to play the animation) to the joiner. However I didn’t find any posts actually walking someone through this, and I do not know how to utilize RPCs yet.
Do I need any specific component on my main game object that holds all the scripts, is it just a simple line of code, or what?
1) it doesn't matter in this case, you may even set the synchronisation to off. All you need is a networkView on the object that is using RPCs 2) never done that our came across that, but I have two guesses: - send an RPC that starts a coroutine on the other client, so they work on both sides independently. Probably feasible if they produce consistent results, but some desynchronisation may occur. - have the side running the coroutine send state updates via RPC to the other client. Though if it's about facing direction, isn't it an option to just synchronise the transform using networkView?
– AyAMrau