Hello everyone, currently I am attempting to spawn a custom player, but my player prefab cannot be found.
I have narrowed down my problem there being a different assetID for the NetworkIdentities on the client and server builds. I have tried to register the prefab with the nethash128 that the server is attempting to spawn, but it does not let me register it with a different assetID since its already been set.
Does anyone know how I can change the assetID of the NetworkIdentity?
Open your client project’s Assets folder in a file explorer, find the [prefab name].prefab.meta file, and replace the guid value with the one from your server project.
This is the same as the assetId. You will have to re-register the player prefab with your Network Manager afterwards, because Unity thinks its a different prefab now.
My solution was to first create the prefab with a NetworkIdentity (and the assetID) in one project (server or client), then on this prefab i make “right click → export package” and export this prefab to the other project that doesn’t have the prefab, this way both projects will have the same prefab with the same assetID.
Optionally, you can modify the prefab on one project and they will continue to have the same assetID.