Skip to content

Commit

Permalink
Added missing XR namespace.
Browse files Browse the repository at this point in the history
  • Loading branch information
lilSander committed Oct 15, 2024
1 parent 837bb4b commit 8d9eb13
Show file tree
Hide file tree
Showing 24 changed files with 955 additions and 922 deletions.
3 changes: 1 addition & 2 deletions Assets/Resources/Prefabs/Players/XRRig.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -3324,7 +3324,7 @@ MonoBehaviour:
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
radialMenu: {fileID: -5982496924579745919, guid: c348712bda248c246b8c49b3db54643f,
RadialMenuActionRef: {fileID: -5982496924579745919, guid: c348712bda248c246b8c49b3db54643f,
type: 3}
--- !u!1 &7806924667908141112
GameObject:
Expand Down Expand Up @@ -5196,7 +5196,6 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: df5e8c7d8b96d6944aaafef73a15f5b0, type: 3}
m_Name:
m_EditorClassIdentifier:
m_RayInteractor: {fileID: 645861538944586177}
inputAction: {fileID: -1379689384741821685, guid: c348712bda248c246b8c49b3db54643f,
type: 3}
undo: {fileID: -989603093121905207, guid: c348712bda248c246b8c49b3db54643f, type: 3}
Expand Down
3 changes: 2 additions & 1 deletion Assets/SEE/Controls/Actions/AcceptDivergenceAction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using SEE.XR;

namespace SEE.Controls.Actions
{
Expand Down Expand Up @@ -116,7 +117,7 @@ public override bool Update()
{
if (SceneSettings.InputType == PlayerInputType.VRPlayer)
{
if (XRSEEActions.Selected
if (XRSEEActions.Selected
&& XRSEEActions.RayInteractor.TryGetCurrent3DRaycastHit(out RaycastHit hit))
{
// find the edge representing the divergence that should be solved.
Expand Down
1 change: 1 addition & 0 deletions Assets/SEE/Controls/Actions/AddEdgeAction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
using SEE.Audio;
using SEE.DataModel.DG;
using SEE.Game.SceneManipulation;
using SEE.XR;

namespace SEE.Controls.Actions
{
Expand Down
1 change: 1 addition & 0 deletions Assets/SEE/Controls/Actions/AddNodeAction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
using System;
using SEE.UI.PropertyDialog;
using SEE.DataModel.DG;
using SEE.XR;

namespace SEE.Controls.Actions
{
Expand Down
1 change: 1 addition & 0 deletions Assets/SEE/Controls/Actions/ContextMenuAction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
using SEE.GO.Menu;
using SEE.UI.Menu.Drawable;
using SEE.UI.Window.PropertyWindow;
using SEE.XR;

namespace SEE.Controls.Actions
{
Expand Down
1 change: 1 addition & 0 deletions Assets/SEE/Controls/Actions/DeleteAction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
using SEE.Audio;
using SEE.Game.SceneManipulation;
using SEE.Utils.History;
using SEE.XR;

namespace SEE.Controls.Actions
{
Expand Down
1 change: 1 addition & 0 deletions Assets/SEE/Controls/Actions/HideAction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using UnityEngine;
using UnityEngine.Assertions;
using SEE.Utils.History;
using SEE.XR;

namespace SEE.Controls.Actions
{
Expand Down
1 change: 1 addition & 0 deletions Assets/SEE/Controls/Actions/MoveAction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
using SEE.Utils.History;
using UnityEngine;
using UnityEngine.EventSystems;
using SEE.XR;


namespace SEE.Controls.Actions
Expand Down
1 change: 1 addition & 0 deletions Assets/SEE/Controls/Actions/NodeManipulationAction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
using SEE.Utils.History;
using System.Collections.Generic;
using UnityEngine;
using SEE.XR;

namespace SEE.Controls.Actions
{
Expand Down
1 change: 1 addition & 0 deletions Assets/SEE/Controls/Actions/SelectAction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using UnityEngine;
using SEE.Audio;
using SEE.GO;
using SEE.XR;

namespace SEE.Controls.Actions
{
Expand Down
1 change: 1 addition & 0 deletions Assets/SEE/Controls/Actions/ShowCodeAction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
using SEE.Utils.History;
using SEE.Game.City;
using SEE.VCS;
using SEE.XR;
using GraphElementRef = SEE.GO.GraphElementRef;
using Range = SEE.DataModel.DG.Range;

Expand Down
1 change: 1 addition & 0 deletions Assets/SEE/Controls/Actions/ShowLabel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using SEE.Game.Operator;
using SEE.GO;
using UnityEngine;
using SEE.XR;

namespace SEE.Controls.Actions
{
Expand Down
1 change: 1 addition & 0 deletions Assets/SEE/Controls/SEEInput.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using SEE.Utils;
using UnityEngine;
using SEE.GO;
using SEE.XR;

namespace SEE.Controls
{
Expand Down
1 change: 1 addition & 0 deletions Assets/SEE/GameObjects/Menu/PlayerMenu.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
using SEE.UI.StateIndicator;
using SEE.Utils;
using UnityEngine;
using SEE.XR;

namespace SEE.GO.Menu
{
Expand Down
1 change: 1 addition & 0 deletions Assets/SEE/UI/PopupMenu/PopupMenu.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
using TMPro;
using UnityEngine;
using UnityEngine.UI;
using SEE.XR;

namespace SEE.UI.PopupMenu
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
using TMPro;
using UnityEngine;
using UnityEngine.Events;
using SEE.XR;

namespace SEE.UI.Window.PropertyWindow
{
Expand Down
1 change: 1 addition & 0 deletions Assets/SEE/UI/Window/TreeWindow/DesktopTreeWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.UI;
using SEE.XR;
using ArgumentException = System.ArgumentException;
using Edge = SEE.DataModel.DG.Edge;
using Node = SEE.DataModel.DG.Node;
Expand Down
1 change: 1 addition & 0 deletions Assets/SEE/Utils/Raycasting.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using UnityEngine.EventSystems;
using UnityEngine.InputSystem;
using UnityEngine.InputSystem.UI;
using SEE.XR;

namespace SEE.Utils
{
Expand Down
49 changes: 26 additions & 23 deletions Assets/SEE/XR/KeyboardInputHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,35 +4,38 @@
using UnityEngine;
using UnityEngine.EventSystems;

/// <summary>
/// This class changes the inputfield for the VR-Keyboard and
/// also activates the keyboard.
/// This script is based on this tutorial: https://www.youtube.com/watch?v=vTonHBr4t4g
/// </summary>
public class KeyboardInputHandler : MonoBehaviour, IPointerClickHandler
namespace SEE.XR
{
/// <summary>
/// The reference to the keyboard GameObject.
/// This class changes the inputfield for the VR-Keyboard and
/// also activates the keyboard.
/// This script is based on this tutorial: https://www.youtube.com/watch?v=vTonHBr4t4g
/// </summary>
private GameObject keyboardGameObject;

private void Start()
public class KeyboardInputHandler : MonoBehaviour, IPointerClickHandler
{
// Cache the reference to the keyboard GameObject
keyboardGameObject = KeyboardManager.instance.gameObject.transform.Find("Keyboard").gameObject;
}
/// <summary>
/// The reference to the keyboard GameObject.
/// </summary>
private GameObject keyboardGameObject;

/// <summary>
/// This method gets called when the user clicks the input field.
/// If the user is in VR, the keyboard gets activated.
/// </summary>
/// <param name="eventdata">Event data associated with the event when the user clicks on the inputfield.</param>
public void OnPointerClick(PointerEventData eventdata)
{
if (SceneSettings.InputType == PlayerInputType.VRPlayer)
private void Start()
{
// Cache the reference to the keyboard GameObject
keyboardGameObject = KeyboardManager.instance.gameObject.transform.Find("Keyboard").gameObject;
}

/// <summary>
/// This method gets called when the user clicks the input field.
/// If the user is in VR, the keyboard gets activated.
/// </summary>
/// <param name="eventdata">Event data associated with the event when the user clicks on the inputfield.</param>
public void OnPointerClick(PointerEventData eventdata)
{
KeyboardManager.instance.inputField = GetComponent<TMP_InputField>();
keyboardGameObject.SetActive(true);
if (SceneSettings.InputType == PlayerInputType.VRPlayer)
{
KeyboardManager.instance.inputField = GetComponent<TMP_InputField>();
keyboardGameObject.SetActive(true);
}
}
}
}
Loading

0 comments on commit 8d9eb13

Please sign in to comment.