@@ -23,8 +23,8 @@ public class WorldAnchorManager : Singleton<WorldAnchorManager>
2323 /// </summary>
2424 private struct AnchorAttachmentInfo
2525 {
26- public GameObject gameObjectToAnchor { get ; set ; }
27- public string anchorName { get ; set ; }
26+ public GameObject GameObjectToAnchor { get ; set ; }
27+ public string AnchorName { get ; set ; }
2828 }
2929
3030 /// <summary>
@@ -36,23 +36,23 @@ private struct AnchorAttachmentInfo
3636 /// The WorldAnchorStore for the current application.
3737 /// Can be null when the application starts.
3838 /// </summary>
39- public WorldAnchorStore anchorStore { get ; set ; }
39+ public WorldAnchorStore AnchorStore { get ; private set ; }
4040
4141 /// <summary>
4242 /// Callback function that contains the WorldAnchorStore object.
4343 /// </summary>
4444 /// <param name="Store">The WorldAnchorStore to cache.</param>
4545 void AnchorStoreReady ( WorldAnchorStore Store )
4646 {
47- anchorStore = Store ;
47+ AnchorStore = Store ;
4848 }
4949
5050 /// <summary>
5151 /// When the app starts grab the anchor store immediately.
5252 /// </summary>
5353 void Awake ( )
5454 {
55- anchorStore = null ;
55+ AnchorStore = null ;
5656 WorldAnchorStore . GetAsync ( AnchorStoreReady ) ;
5757 }
5858
@@ -61,7 +61,7 @@ void Awake()
6161 /// </summary>
6262 void Update ( )
6363 {
64- if ( anchorStore != null && anchorOperations . Count > 0 )
64+ if ( AnchorStore != null && anchorOperations . Count > 0 )
6565 {
6666 DoAnchorOperation ( anchorOperations . Dequeue ( ) ) ;
6767 }
@@ -73,16 +73,16 @@ void Update()
7373 /// a new anchor will be saved under the specified name.
7474 /// </summary>
7575 /// <param name="gameObjectToAnchor">The Gameobject to attach the anchor to.</param>
76- /// <param name="AnchorName ">Name of the anchor.</param>
77- public void AttachAnchor ( GameObject gameObjectToAnchor , string AnchorName )
76+ /// <param name="anchorName ">Name of the anchor.</param>
77+ public void AttachAnchor ( GameObject gameObjectToAnchor , string anchorName )
7878 {
7979 if ( gameObjectToAnchor == null )
8080 {
8181 Debug . LogError ( "Must pass in a valid gameObject" ) ;
8282 return ;
8383 }
8484
85- if ( string . IsNullOrEmpty ( AnchorName ) )
85+ if ( string . IsNullOrEmpty ( anchorName ) )
8686 {
8787 Debug . LogError ( "Must supply an AnchorName." ) ;
8888 return ;
@@ -91,8 +91,8 @@ public void AttachAnchor(GameObject gameObjectToAnchor, string AnchorName)
9191 anchorOperations . Enqueue (
9292 new AnchorAttachmentInfo ( )
9393 {
94- gameObjectToAnchor = gameObjectToAnchor ,
95- anchorName = AnchorName
94+ GameObjectToAnchor = gameObjectToAnchor ,
95+ AnchorName = anchorName
9696 }
9797 ) ;
9898 }
@@ -105,7 +105,7 @@ public void AttachAnchor(GameObject gameObjectToAnchor, string AnchorName)
105105 public void RemoveAnchor ( GameObject gameObjectToUnanchor )
106106 {
107107 // This case is unexpected, but just in case.
108- if ( anchorStore == null )
108+ if ( AnchorStore == null )
109109 {
110110 Debug . LogError ( "remove anchor called before anchor store is ready." ) ;
111111 }
@@ -114,7 +114,7 @@ public void RemoveAnchor(GameObject gameObjectToUnanchor)
114114
115115 if ( anchor != null )
116116 {
117- anchorStore . Delete ( anchor . name ) ;
117+ AnchorStore . Delete ( anchor . name ) ;
118118 DestroyImmediate ( anchor ) ;
119119 }
120120 }
@@ -125,8 +125,8 @@ public void RemoveAnchor(GameObject gameObjectToUnanchor)
125125 /// <param name="anchorAttachmentInfo">Parameters for attaching the anchor.</param>
126126 void DoAnchorOperation ( AnchorAttachmentInfo anchorAttachmentInfo )
127127 {
128- string AnchorName = anchorAttachmentInfo . anchorName ;
129- GameObject gameObjectToAnchor = anchorAttachmentInfo . gameObjectToAnchor ;
128+ string AnchorName = anchorAttachmentInfo . AnchorName ;
129+ GameObject gameObjectToAnchor = anchorAttachmentInfo . GameObjectToAnchor ;
130130
131131 if ( gameObjectToAnchor == null )
132132 {
@@ -135,7 +135,7 @@ void DoAnchorOperation(AnchorAttachmentInfo anchorAttachmentInfo)
135135 }
136136
137137 // Try to load a previously saved world anchor.
138- WorldAnchor savedAnchor = anchorStore . Load ( AnchorName , gameObjectToAnchor ) ;
138+ WorldAnchor savedAnchor = AnchorStore . Load ( AnchorName , gameObjectToAnchor ) ;
139139 if ( savedAnchor == null )
140140 {
141141 // Either world anchor was not saved / does not exist or has a different name.
@@ -203,7 +203,7 @@ private void Anchor_OnTrackingChanged(WorldAnchor self, bool located)
203203 private void SaveAnchor ( WorldAnchor anchor )
204204 {
205205 // Save the anchor to persist holograms across sessions.
206- if ( anchorStore . Save ( anchor . name , anchor ) )
206+ if ( AnchorStore . Save ( anchor . name , anchor ) )
207207 {
208208 Debug . Log ( gameObject . name + " : World anchor saved successfully." ) ;
209209 }
0 commit comments