- Home /
UNET Bug with NetworkHash128 and Saving Prefabs
I am trying to use UNET to spawn prefabs over a networked game and i am having a weird issue.
So i am generating a unique NetworkHash128 for each prefab i have, say for my cube prefab i have the hash as "0000000000000000000000000000e000", I register the prefab with that hashkey on both server and client.
Now when i go to spawn the object over the network, i have no issue spawning it through 2 editor instances (1 server 1 client), but when i go to an android and connect to the server, i cant spawn it and it comes up with the error "Failed to spawn server object". I did a whole lot of debugging and the problem came down to the Hash key being different on the android client, compared to the windows client and windows server (Both through editor).
I output the hash keys in the Clientscene.prefabs before and after i save a prefab, and the hash i saved the prefab with changes to "9214ysbr4wbq4812481kewr" for example. It only saves as different hashes on Android server/client.
Does anyone know why this is happening? I cant find anything on this kind of issue.