Quick question regarding Unity Netcode

Hello. I am a relatively new Unity developer and the first post on this forum.
If I mess something up regarding unity forums, please let me know, thanks.

In Unity, there are ClientRpcs and ServerRpcs that allow the code to be ran on the client and server respectively (I think, tell me if I am wrong).

However, what about methods not marked with [ClientRpc] or [ServerRpc]?
A common method would be the Update method, y’know, the one that runs every frame.
Would the code within the Update method be run on the client? Server? Both?

(A little background into why I am asking this)

I was following a YouTube tutorial about saving data (Using Unity Cloud Save Service), and it needed the “await” keyword.

Unfortunately, ServerRpcs cannot be marked as async, so a workaround would be to create a new async method that will retrieve the data and return that value to the server rpc method.

However, I am not sure if this data being retrieved in this async method is being executed by the client or the server. I do not want the client accessing and modifying (via hacks) the data before it returns a value to the server basically, so I need to know.

Thanks.

Hi TimothyUnity12, they would run on the device on which you call them. Update is called autoamtically on active script instances, so if you have a GameObject with a Script that has an Update(), and both the GameObejct and the script component are Enabled on both the clients and the server, the update() will be called everywhere.

Thanks for your response sir. That clears things up.