Best way to call an RPC from a Child object (that doesn't have its own PhotonView?)

My "Player" object has a PhotonView. It has two child objects: a "Left Gun" and a "Right Gun". When the player switches weapons, or shoots, I'd like to call an RPC from scripts on the Left Gun / Right Gun.

The Left Gun / Right Gun don't have PhotonView components (since I'm guessing its not wise to have a bunch of PhotonViews on one GameObject?), so I can't call an RPC from them.

I'd like to keep all of the code "local" to the Left Gun / Right Gun, rather than have to add a Method on the Player object for every RPC that will need to be called.

Is there some way to do this, or some convention that I'm missing? Thanks for the help!

Note: I found this old thread, but I don't feel like the suggested answer is correct:


Sign In or Register to comment.