Skip to content

Commit 4d75b83

Browse files
committed
addressing more code review feedback
1 parent 5ab7ac9 commit 4d75b83

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

Assets/HoloToolkit/SpatialMapping/Scripts/TapToPlace.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,20 +24,20 @@ public partial class TapToPlace : MonoBehaviour
2424
/// <summary>
2525
/// Manages persisted anchors.
2626
/// </summary>
27-
WorldAnchorManager anchorManager;
27+
private WorldAnchorManager anchorManager;
2828

2929
/// <summary>
3030
/// Controls spatial mapping. In this script we access spatialMappingManager
3131
/// to control rendering and to access the physics layer mask.
3232
/// </summary>
33-
SpatialMappingManager spatialMappingManager;
33+
private SpatialMappingManager spatialMappingManager;
3434

3535
/// <summary>
3636
/// Keeps track of if the user is moving the object or not.
3737
/// </summary>
38-
bool placing = false;
38+
private bool placing;
3939

40-
void Start()
40+
private void Start()
4141
{
4242
// Make sure we have all the components in the scene we need.
4343
anchorManager = WorldAnchorManager.Instance;
@@ -64,7 +64,7 @@ void Start()
6464
}
6565

6666
// Called by GazeGestureManager when the user performs a tap gesture.
67-
void OnSelect()
67+
public void OnSelect()
6868
{
6969
// On each tap gesture, toggle whether the user is in placing mode.
7070
placing = !placing;
@@ -87,7 +87,7 @@ void OnSelect()
8787
}
8888
}
8989

90-
void Update()
90+
private void Update()
9191
{
9292
// If the user is in placing mode,
9393
// update the placement to match the user's gaze.

Assets/HoloToolkit/Utilities/Scripts/WorldAnchorManager.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,15 @@ private struct AnchorAttachmentInfo
4242
/// Callback function that contains the WorldAnchorStore object.
4343
/// </summary>
4444
/// <param name="Store">The WorldAnchorStore to cache.</param>
45-
void AnchorStoreReady(WorldAnchorStore Store)
45+
private void AnchorStoreReady(WorldAnchorStore Store)
4646
{
4747
AnchorStore = Store;
4848
}
4949

5050
/// <summary>
5151
/// When the app starts grab the anchor store immediately.
5252
/// </summary>
53-
void Awake()
53+
private void Awake()
5454
{
5555
AnchorStore = null;
5656
WorldAnchorStore.GetAsync(AnchorStoreReady);
@@ -59,7 +59,7 @@ void Awake()
5959
/// <summary>
6060
/// Each frame see if there is work to do and if we can do a unit, do it.
6161
/// </summary>
62-
void Update()
62+
private void Update()
6363
{
6464
if (AnchorStore != null && anchorOperations.Count > 0)
6565
{
@@ -123,7 +123,7 @@ public void RemoveAnchor(GameObject gameObjectToUnanchor)
123123
/// Function that actually adds the anchor to the game object.
124124
/// </summary>
125125
/// <param name="anchorAttachmentInfo">Parameters for attaching the anchor.</param>
126-
void DoAnchorOperation(AnchorAttachmentInfo anchorAttachmentInfo)
126+
private void DoAnchorOperation(AnchorAttachmentInfo anchorAttachmentInfo)
127127
{
128128
string AnchorName = anchorAttachmentInfo.AnchorName;
129129
GameObject gameObjectToAnchor = anchorAttachmentInfo.GameObjectToAnchor;
@@ -156,7 +156,7 @@ void DoAnchorOperation(AnchorAttachmentInfo anchorAttachmentInfo)
156156
/// </summary>
157157
/// <param name="gameObjectToAnchor">The GameObject to attach the anchor to.</param>
158158
/// <param name="anchorName">The name to give to the anchor.</param>
159-
void CreateAnchor(GameObject gameObjectToAnchor, string anchorName)
159+
private void CreateAnchor(GameObject gameObjectToAnchor, string anchorName)
160160
{
161161
WorldAnchor anchor = gameObjectToAnchor.AddComponent<WorldAnchor>();
162162
anchor.name = anchorName;

0 commit comments

Comments
 (0)