A way to monitor Puppet variable changes

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Toffe

I’m not sure If I’m doing things right. I happened to stumble upon a big obstacle within my project.

I am aware that RPC functions are non-blocking but is there a way that a client can be notified if its puppet variable’s value has changed.

If I remember correctly, Unity has this feature where you can hook a SyncVar variable onto a function whenever it gets updated, triggering that hooked function.

— The general scenario —

  1. A client acquires a weapon.
  2. Client RPC’s host for the acquired weapon’s weapon data // This section is non blocking - This part is my problem. Client has no way of determining if weapon data has arrive from the host in a single function.
  3. Host sends weapon data to requesting client.
  4. Client should receive weapon data so that client can be happy.

Thank you in advance.