public override void OnInspectorGUI() { BeginInspectorGUI(); Field(true, "leftHand"); Field(true, "rightHand"); UnityGUI.Space(); Field(true, "applyOffset"); if (target.applyOffset) { Field(true, "leftPositionOffset"); Field(true, "leftRotationOffset"); Field(true, "editLeftOffset"); UnityGUI.Space(); Field(true, "rightPositionOffset"); Field(true, "rightRotationOffset"); Field(true, "editRightOffset"); } UnityGUI.Space(2); if (UnityGUI.Foldout(Application.isPlaying, "Controller State")) { if (XRDevice.model == "Oculus Rift CV1") { DrawOculus(); } else if (XRDevice.model == "Vive MV" || XRDevice.model == "VIVE_Pro MV") { DrawVive(); } Repaint(); } EndInspectorGUI(); }