Hi,
I’m using RPC calls to update game objects between client and server. I want this to continue to happen even though the user used iOS multitasking to switch to another app.
I found this thread for starting pointers.
By default, in AppController.mm applicationWillResignActive
is called which in turn invokes UnityPause(true)
which ultimately causes the network connection to drop. I have to reestablish the connection to the server when the app regains focus.
I commented out the pausing and this will keep the networking from dropping but it ceases to transmit networking data. I guess this is because of the RPC calls being hooked to the run loop. I’m using Update()
for the RPC calls which is called once per rendered frame. Is there a method in MonoBehaviour that is called even though nothing is rendered, which I could use for RPC instead?