mirror of
https://udrimavric.com/MAVRIC/Stratasys-450mc-VR.git
synced 2025-01-22 15:18:33 -05:00
MAVRIC-2183: Updated locking boolean to be a little bit better
This commit is contained in:
parent
f8ee8dcf35
commit
6569dad7b6
@ -1,7 +1,8 @@
|
||||
/// Traken from https://forum.unity.com/threads/how-to-prevent-interactable-from-being-selected-while-in-socket.1317246/#post-9101254
|
||||
|
||||
using UnityEngine.Assertions;
|
||||
|
||||
using UnityEngine.Serialization;
|
||||
|
||||
namespace UnityEngine.XR.Interaction.Toolkit.Filtering
|
||||
{
|
||||
[DisallowMultipleComponent]
|
||||
@ -13,14 +14,14 @@ namespace UnityEngine.XR.Interaction.Toolkit.Filtering
|
||||
[SerializeField]
|
||||
private XRBaseInteractable interactable;
|
||||
|
||||
[SerializeField]
|
||||
private bool m_locked = false;
|
||||
[FormerlySerializedAs("m_locked")] [SerializeField]
|
||||
private bool isLocked = false;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Properties
|
||||
|
||||
public bool locked { get => m_locked; set => m_locked = value; }
|
||||
public bool IsLocked { get => isLocked; set => isLocked = value; }
|
||||
|
||||
public bool canProcess => true;
|
||||
|
||||
@ -83,7 +84,7 @@ namespace UnityEngine.XR.Interaction.Toolkit.Filtering
|
||||
if (interactable == null)
|
||||
return false;
|
||||
|
||||
return !m_locked;
|
||||
return !isLocked;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
@ -15,14 +15,14 @@ namespace UnityEngine.XR.Interaction.Toolkit.Filtering
|
||||
[SerializeField]
|
||||
private XRBaseInteractor interactor;
|
||||
|
||||
[FormerlySerializedAs("m_locked")] [SerializeField]
|
||||
private bool locked = false;
|
||||
[FormerlySerializedAs("locked")] [SerializeField]
|
||||
private bool isLocked = false;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Properties
|
||||
|
||||
public bool Locked { get => locked; set => locked = value; }
|
||||
public bool IsLocked { get => isLocked; set => isLocked = value; }
|
||||
|
||||
public bool canProcess => true;
|
||||
|
||||
@ -85,7 +85,7 @@ namespace UnityEngine.XR.Interaction.Toolkit.Filtering
|
||||
if (interactor == null)
|
||||
return false;
|
||||
|
||||
return !locked;
|
||||
return !isLocked;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
Loading…
Reference in New Issue
Block a user