Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Join us on March 30, 2023, between 5 am & 1 pm EST, in the Performance Profiling Dev Blitz Day 2023 - Q&A forum and Discord where you can connect with our teams behind the Memory and CPU Profilers.
    Dismiss Notice

Question [PUN2] Are there ways to know if a RPC has been received?

Discussion in 'Multiplayer' started by Chr0my, Jul 19, 2020.

  1. Chr0my

    Chr0my

    Joined:
    Dec 28, 2018
    Posts:
    2
    Hiya!

    Question:

    Is there a way to say - OnRPCReceived("RPC_Anything").do something.

    I just want to change the text, when the rpc is received.

    Sorry if you don't understand.
     
  2. Barry100

    Barry100

    Joined:
    Nov 12, 2014
    Posts:
    198
    surely its just a class with a method of pun so as long as you have pun referred to in class it should work as you have asked.

    Go look at the OnRPCReceived class and see methods of it.