1 Reply

PUN has two types of network objects... player network objects and scene objects. A scene object is an object that is owned by the photon network and if the masterclient leaves then it remains in the game (great for enemies). Player network objects are more temporary objects and only exist as long as their owners are connected. So the player model could be a player network object and is controlled directly by that player, not the scene. For scene objects you need to use RPC calls to update information across the network but for player network objects it could get more complicated if you want to increase optimization/limit your RPC calls by using OnPhotonSerializeView. Any type of object that's going to be synced across the network (besides preplaced map details) is going to require a PhotonView. So for your object with the animation an RPC call is probably the best way to go about it because i'm not sure if its a scene object or not.

On the object that you are animating add a PhotonView and then create a script and add the following to the Update() function:

What this script does is activate the object's animation if a player presses the space bar. When the space bar is pressed then the PhotonView on the object tells its self across the network to play the animation. This script functions whether or not the object is a scene object or player object. The object is present on every client across the network but it is unaware if itself across the network. Using the RPC call tells its PhotonView to communicate with itself across the network to let itself to execute the animation.