static void CreateVRVisualisationPrefab() { GameObject obj = new GameObject("[IATK] New VR Visualisation"); VRVisualisation vrVisComponent = obj.AddComponent<VRVisualisation>(); Selection.activeGameObject = obj; MakeInteractable(vrVisComponent); }
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); }