networkview.RPC not accessible in unity 5.4

i am try to access networkView.RPC but its giving be error as also shown in below attached image

Error CS0619 ‘Component.networkView’ is obsolete: 'Property networkView has been deprecated. Use GetComponent() instead. (UnityUpgradable)

And… have you done what the error message is telling you?

Just in case it’s not clear, networkView (just like “rigidbody” and “collider” from GameObject’s) has been deprecated since the first versions of Unity 5, and the way to get the networkView component of an object is to write:


instead of:


Anyway, Unity does this for you automatically when it detects your code is old (at least this deprecated fields) and shows you a dialog saying it will update your scripts. It will even show that dialog if you write that line, save the file and go back to Unity.

Also, NetworkView.RPC method is also deprecated, the new API works differently. You should check the UNET manual: Unity - Manual: Multiplayer and Networking

EDIT: And from the picture… Application.LoadLevel is also deprecated (That yellow underline is a warning saying you must use ScreenManager.LoadScene now). If you’re following a tutorial or some guide, look for a newer one, that clearly wasn’t written for Unity 5.4.