- Home /
Error in runtime:"View ID AllocatedID: 6316 not found during lookup. Strange behaviour may occur"
I can make a right sychronization (or at least this is what I believe) in the client version and server version of my game but when I do this:
if(Network.isServer)
{
var viewID2 = Network.AllocateViewID();
networkView.RPC("SpawnBox",RPCMode.All,viewID2,transform.position,index);
and inside of my RPC function:
clone = Instantiate(array_de_globos[num], transform.position+Vector3 (Random.Range(0, gridX),0, Random.Range(0, gridY))*spacing , Quaternion.identity);
The problem I've got now with my networking instantiation for a right synchronization is that I receive two messages continuosly (due to the update loop):
View ID AllocatedID: 6316 not found during lookup. Strange behaviour may occur. Couldn't perform remote Network.Destroy because the network view 'AllocatedID: 6316' could not be located.
The problem now is that after the right instantiation the destruction is made in another script...I don't know if this is related to the error messages which don't disturb for the execution but I think reduce the FPS rate.
Any idea?
Thank you in adavance.
Answer by Bunny83 · Dec 07, 2011 at 02:51 AM
Make sure you assign the networkViewID (which you pass along with the RPC) to the NetworkView of your instantiated clone. Otherwise Unity can't link the two objects on the client and server.
Every peer / PC / client has it's own objects and they act on it's own, only the NetworkViewID tells Unity which object on this side belongs to which object on the other side. The client that created the NetworkViewID is the owner and he automatically send the required data. All other peers will receive this data and apply it to the object with the same ViewID.