- Home /
Question by
Derpyness · Nov 15, 2014 at 02:28 AM ·
networkingrpcbuffernetwork.destroy
Buffered Network.Destroy?
I was wondering how I would go about buffering a network.destroy. I know that network.instantiate is buffered already, but when I break blocks on the other screens, it doesn't load for anybody else on the network.
Destruction part of my code:
//Destroy
if(Input.GetMouseButtonDown(1)){
Ray ray = new Ray(transform.position,transform.forward);
RaycastHit hit;
if (Physics.Raycast (ray,out hit,11)){
Network.RemoveRPCs(networkView.viewID);
Network.Destroy(hit.collider.gameObject);
//Debug.Log(hit.collider.gameObject.transform.position);
}
//Debug.Log("Right Click");
//var DestroyPos = Input.mousePosition;
//var DestroyObjectPos = Camera.main.ScreenToWorldPoint(DestroyPos);
//var hit:RaycastHit;
//Destroy(hit.transform.gameObject);
}
Comment