From 13d40a3c47ef083a6d9122bf11b9ff9377003c26 Mon Sep 17 00:00:00 2001 From: Kurtis Eveleigh Date: Fri, 1 Jun 2018 17:14:53 -0700 Subject: [PATCH 1/4] Added missing meta --- .../Utilities/Scripts/BoundingBoxHelper.cs.meta | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 Assets/HoloToolkit/Utilities/Scripts/BoundingBoxHelper.cs.meta diff --git a/Assets/HoloToolkit/Utilities/Scripts/BoundingBoxHelper.cs.meta b/Assets/HoloToolkit/Utilities/Scripts/BoundingBoxHelper.cs.meta new file mode 100644 index 00000000000..9b4c0342b77 --- /dev/null +++ b/Assets/HoloToolkit/Utilities/Scripts/BoundingBoxHelper.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: 791849c2205475040acd27e0d0ce981a +timeCreated: 1527894238 +licenseType: Pro +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: From 6a8e856ece1377caa17f4b1add629fb7fa24bc36 Mon Sep 17 00:00:00 2001 From: Kurtis Eveleigh Date: Fri, 1 Jun 2018 17:26:30 -0700 Subject: [PATCH 2/4] Adding copyright and removing MonoBehaviour from BoundingBoxHelper --- Assets/HoloToolkit/Utilities/Scripts/BoundingBoxHelper.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Assets/HoloToolkit/Utilities/Scripts/BoundingBoxHelper.cs b/Assets/HoloToolkit/Utilities/Scripts/BoundingBoxHelper.cs index 73ad51db64d..158035c6c18 100644 --- a/Assets/HoloToolkit/Utilities/Scripts/BoundingBoxHelper.cs +++ b/Assets/HoloToolkit/Utilities/Scripts/BoundingBoxHelper.cs @@ -1,4 +1,6 @@ -using System.Collections; +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See LICENSE in the project root for license information. + using System.Collections.Generic; using UnityEngine; @@ -10,7 +12,7 @@ /// The dynamic functions can be used to obtain boundingcube info on an object's Update loop. Operations /// are minimized in the dynamic use scenario. /// -public class BoundingBoxHelper : MonoBehaviour +public class BoundingBoxHelper { readonly int[] face0 = { 0, 1, 3, 2 }; readonly int[] face1 = { 1, 5, 7, 3 }; From c79b63c5451e5733c698d90e57a9635e6c0aed9e Mon Sep 17 00:00:00 2001 From: Mark Grossnickle Date: Mon, 4 Jun 2018 11:12:00 -0600 Subject: [PATCH 3/4] Keyboard Fix for missing keys There is a bug with the keyboard which causes the first button in each row to not appear or at least be positioned correctly. I forget the exact reasoning behind it as I made this change locally 6 months ago but I believe it had something to do with gameObjects being inactive if you initialized a keyboard and then hid it. In any case, it appears to be unecessary overhead for the layout to update at runtime. --- Assets/HoloToolkit/UX/Scripts/UICollection.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Assets/HoloToolkit/UX/Scripts/UICollection.cs b/Assets/HoloToolkit/UX/Scripts/UICollection.cs index 42e550117aa..316dac4183b 100644 --- a/Assets/HoloToolkit/UX/Scripts/UICollection.cs +++ b/Assets/HoloToolkit/UX/Scripts/UICollection.cs @@ -122,6 +122,7 @@ public void RemoveAllItems() private void CollectItems() { + if (!Application.isEditor) { return; } Items.Clear(); foreach (Transform childTransform in transform) @@ -136,6 +137,7 @@ private void CollectItems() protected virtual void UpdateLayout() { + if (!Application.isEditor) { return; } Rect rect = rectTransform.rect; Vector2 updatedSize = Vector2.zero; From 8d2a15b86151b7246a934e318d016473a7e7b31b Mon Sep 17 00:00:00 2001 From: Mark Grossnickle Date: Mon, 4 Jun 2018 13:48:44 -0600 Subject: [PATCH 4/4] Removed overzealous IsEditor Checks By moving the IsEditor checks to just Start/Update it will allow developers to continue to add/remove items at runtime. --- Assets/HoloToolkit/UX/Scripts/UICollection.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Assets/HoloToolkit/UX/Scripts/UICollection.cs b/Assets/HoloToolkit/UX/Scripts/UICollection.cs index 316dac4183b..1c870568107 100644 --- a/Assets/HoloToolkit/UX/Scripts/UICollection.cs +++ b/Assets/HoloToolkit/UX/Scripts/UICollection.cs @@ -65,6 +65,8 @@ private void Start() // Verify this is attached to a GameObject with a rect transform rectTransform = GetComponent(); + if (!Application.isEditor) { return; } + // Collect children items already added (likely added in the Editor) CollectItems(); UpdateLayout(); @@ -121,8 +123,7 @@ public void RemoveAllItems() } private void CollectItems() - { - if (!Application.isEditor) { return; } + { Items.Clear(); foreach (Transform childTransform in transform) @@ -137,7 +138,6 @@ private void CollectItems() protected virtual void UpdateLayout() { - if (!Application.isEditor) { return; } Rect rect = rectTransform.rect; Vector2 updatedSize = Vector2.zero;