Пример #1
0
 public void button()
 {
     if (hotspotLinkedTo != null)
     {
         ComponentHandler componentHandler = hotspotLinkedTo.AddMissingComponent <ComponentHandler>();
         Rigidbody        modelRigidbody   = hotspotLinkedTo.AddMissingComponent <Rigidbody>();
         modelRigidbody.useGravity  = false;
         modelRigidbody.isKinematic = false;
         modelRigidbody.mass        = 200;
         modelRigidbody.drag        = 1;
         modelRigidbody.angularDrag = 0.7f;
         ModelComponentViewerManager.vrControlls.Halt();
         componentHandler.IsolateModelComponent(hotspotLinkedTo.transform.position);
     }
     else
     {
         throw new System.ArgumentException("Hotspot must be linked to something!");
     }
 }