コード例 #1
0
    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();
    }
コード例 #2
0
 // Use this for initialization
 void Start()
 {
     grab = gameObject.AddComponent <OVRGrabbable>();
     grab.DetectGrabPoints();
 }