예제 #1
0
 static void CreateVRVisualisationPrefab()
 {
     GameObject obj = new GameObject("[IATK] New VR Visualisation");
     VRVisualisation vrVisComponent = obj.AddComponent<VRVisualisation>();
     Selection.activeGameObject = obj;
     MakeInteractable(vrVisComponent);
 }
예제 #2
0
        private static void MakeInteractable(VRVisualisation vrVisComponent)
        {
            GameObject linearJointDrivePrefab = GetPrefab(prefabInteractionsLinearJointDrive);
            vrVisComponent.linearJointDrivePrefab = linearJointDrivePrefab;

            GameObject interactablePrefab = GetPrefab(prefabInteractable);
            GameObject newInteractable = vrVisComponent.WrapIn(Instantiate(interactablePrefab), interactableSuffix);

            ConfigInteractableRigidbody(newInteractable);
            ConfigInteractableGrabAction(newInteractable);
        }