RPC - Transform not Supported?

I’m working on a spawn script for my network game, and I need my RPC to respawn a dead player to all the clients. But I can’t have a that ‘dead players’ transform as a parameter, so how else would I uniquely identify the dead player in the RPC, to be able to spawn him?

I hope this simple question has a simple answer :confused:

Thanks again,

Ollie

You can’t send the transform but you can send the position and the rotation - RPC supports Vector3 and Quaternion.

You can use the networkViewID to identify the character or if that isn’t working you could create a unique identifier as a string.

A good way of doing that is to use a Guid and turn it into a string:

public string id = Guid.NewGuid().ToString();

You will need to import the System namespace to access Guid