void DropLast() { GameObject child = gameObject.transform.GetChild(transform.childCount - 1).gameObject; child.transform.parent = null; child.gameObject.AddComponent <Rigidbody>(); OVRGrabbable grab = child.gameObject.AddComponent <OVRGrabbable>(); grab.enabled = true; grab.DetectGrabPoints(); }
// Use this for initialization void Start() { grab = gameObject.AddComponent <OVRGrabbable>(); grab.DetectGrabPoints(); }