Search code examples
unity-game-enginerpc

Does it matter which NetworkView I make an RPC from in Unity?


I've been wondering, if I write fxManager.GetComponent<NetworkView>().RPC("bla", bla.bla); it works, BUT if I write this.GetComponent<NetworkView>().RPC("bla", bla.bla); it works perfectly too

Is there even a difference how to call RPCs? Should I define the exact I want to get the RPC from or can I just call it on desired object?


Solution

  • No, it doesn't matter which you do. Any NetworkView can send the RPC.