Skip to content

Commit 91b44e5

Browse files
renamed appbar boundingbox property to target to be more generic / also changed type to monobehaviour to prepare for upcoming support of bounds control
1 parent babb016 commit 91b44e5

File tree

1 file changed

+5
-5
lines changed
  • Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/AppBar

1 file changed

+5
-5
lines changed

Assets/MixedRealityToolkit.SDK/Features/UX/Scripts/AppBar/AppBar.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public enum AppBarStateEnum
5555
/// <summary>
5656
/// Object the app bar is controlling - This object must implement the IBoundsTargetProvider.
5757
/// </summary>
58-
public BoundingBox TargetBoundingBox
58+
public MonoBehaviour Target
5959
{
6060
get { return boundingBox; }
6161
set { boundingBox = value; }
@@ -373,12 +373,12 @@ public void OnButtonPressed(AppBarButton button)
373373
protected virtual void OnClickRemove()
374374
{
375375
// Set the app bar and bounding box to inactive
376-
var boundsProvider = TargetBoundingBox as IBoundsTargetProvider;
376+
var boundsProvider = Target as IBoundsTargetProvider;
377377
if (boundsProvider != null)
378378
{
379379
boundsProvider.Target.SetActive(false);
380380
}
381-
BoundingBox.gameObject.SetActive(false);
381+
Target.gameObject.SetActive(false);
382382
gameObject.SetActive(false);
383383
}
384384

@@ -469,7 +469,7 @@ private void UpdateButtons()
469469

470470
private void UpdateTargetObject()
471471
{
472-
var boundsProvider = BoundingBox as IBoundsTargetProvider;
472+
var boundsProvider = Target as IBoundsTargetProvider;
473473
if (boundsProvider == null || boundsProvider.Target == null)
474474
{
475475
if (DisplayType == AppBarDisplayTypeEnum.Manipulation)
@@ -505,7 +505,7 @@ private void UpdateTargetObject()
505505

506506
private void FollowTargetObject(bool smooth)
507507
{
508-
var boundsProvider = BoundingBox as IBoundsTargetProvider;
508+
var boundsProvider = Target as IBoundsTargetProvider;
509509
if (boundsProvider == null)
510510
return;
511511

0 commit comments

Comments
 (0)