I have two different versions of my game. A server build and a client build. However, they cannot instantiate objects spawned by each other with UNET due to the asset ID of the prefabs being different. Is there I way I can assign them a specific asset ID?
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.
add a static member to your class say an int and add 1 whenever an object is created, then when assigning the id you can concatenate the static member in any class without having to have an instance of the class in your script.
I had the same problem, but the solution wasn’t to set the assetId manually, but make the object involved a Prefab. For some reason this then had the same assetId.
I guess Multi-platform projects don’t support UNET unless every item is a separate prefab, which is horrendous.
Note, it had to be a separate prefab, not a modified instance.