public override void OnInspectorGUI() { DrawDefaultInspector(); if (buttonStyle == null) { buttonStyle = new GUIStyle(EditorStyles.miniButtonRight) { fixedWidth = 75 } } ; trajectoryPositionsPatcher = (TrajectoryPositionsPatcher)target; GUILayout.Label("All Urdf Joints", EditorStyles.boldLabel); DisplaySettingsToggle(new GUIContent("Subs. Trajectory Pos.", "Adds/removes a Trajectory Positions Writer on each joint."), trajectoryPositionsPatcher.SetSubscribeTrajectoryPositions); }
private void DisableVuforia() { UrdfRobot RealRobot = null; UrdfRobot GhostRobot = null; foreach (GameObject objectToClone in objectsToClone) { GameObject cloneObject = Instantiate <GameObject>(objectToClone); cloneObject.transform.parent = null; cloneObject.transform.localScale = objectToClone.transform.lossyScale; cloneObject.transform.position = objectToClone.transform.position; cloneObject.transform.rotation = objectToClone.transform.rotation; if (cloneObject.name == RealRobotName) { RealRobot = cloneObject.GetComponent <UrdfRobot>(); } else if (cloneObject.name == GhostRobotName) { GhostRobot = cloneObject.GetComponent <UrdfRobot>(); } } VuforiaBehaviour.Instance.enabled = false; if (RealRobot) { JointStatePatcher jsp = rosConnector.GetComponent <JointStatePatcher>(); jsp.UrdfRobot = RealRobot; jsp.SetSubscribeJointStates(true); } if (GhostRobot) { TrajectoryPositionsPatcher tpp = rosConnector.GetComponent <TrajectoryPositionsPatcher>(); tpp.ghostRobot = GhostRobot; tpp.SetSubscribeTrajectoryPositions(true); } }