From 7e5af09ba8bbdce3cdd2033c91d82a65b16de5dc Mon Sep 17 00:00:00 2001
From: HossamBasion <45504896+HossamBasion@users.noreply.github.com>
Date: Tue, 26 Mar 2024 12:23:21 -0700
Subject: [PATCH] Made bounds control more overridable
---
.../BoundsControl/BoundsControl.cs | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/com.microsoft.mrtk.spatialmanipulation/BoundsControl/BoundsControl.cs b/com.microsoft.mrtk.spatialmanipulation/BoundsControl/BoundsControl.cs
index 8063e7b1176..87682c234c9 100644
--- a/com.microsoft.mrtk.spatialmanipulation/BoundsControl/BoundsControl.cs
+++ b/com.microsoft.mrtk.spatialmanipulation/BoundsControl/BoundsControl.cs
@@ -530,7 +530,7 @@ private void Awake()
}
}
- private void Update()
+ public virtual void Update()
{
// If we need to recompute bounds (usually because we found a
// UGUI element), make sure we've waited enough frames since
@@ -672,7 +672,7 @@ private bool ComputeBounds(bool isSecondPass = false)
/// Called by from its OnSelectExited.
/// Routes the XRI event data through, as well as a reference to itself, the selected handle.
///
- internal void OnHandleSelectExited(BoundsHandleInteractable handle, SelectExitEventArgs args)
+ public virtual void OnHandleSelectExited(BoundsHandleInteractable handle, SelectExitEventArgs args)
{
if (currentHandle == handle)
{
@@ -687,7 +687,7 @@ internal void OnHandleSelectExited(BoundsHandleInteractable handle, SelectExitEv
/// Called by from its OnSelectEntered.
/// Routes the XRI event data through, as well as a reference to itself, the selected handle.
///
- internal void OnHandleSelectEntered(BoundsHandleInteractable handle, SelectEnterEventArgs args)
+ public virtual void OnHandleSelectEntered(BoundsHandleInteractable handle, SelectEnterEventArgs args)
{
if (currentHandle != null)
{
@@ -734,7 +734,7 @@ internal void OnHandleSelectEntered(BoundsHandleInteractable handle, SelectEnter
private static readonly ProfilerMarker TransformTargetPerfMarker =
new ProfilerMarker("[MRTK] BoundsControl.TransformTarget");
- private void TransformTarget()
+ public virtual void TransformTarget()
{
using (TransformTargetPerfMarker.Auto())
{