File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Assets/MRTK/SDK/Features/UX/Scripts/Pointers Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -168,9 +168,6 @@ protected override async void Start()
168168
169169 await EnsureInputSystemValid ( ) ;
170170
171- // Setting the pointerName
172- PointerName = $ "{ Handedness } _{ gameObject . name } ";
173-
174171 // We've been destroyed during the await.
175172 if ( this == null )
176173 {
@@ -230,6 +227,12 @@ public override IMixedRealityController Controller
230227
231228 if ( base . Controller != null && this != null )
232229 {
230+ // Ensures that the basePointerName is only initialized once
231+ if ( basePointerName == string . Empty )
232+ {
233+ basePointerName = gameObject . name ;
234+ }
235+ PointerName = $ "{ Handedness } _{ basePointerName } ";
233236 InputSourceParent = base . Controller . InputSource ;
234237 SetCursor ( ) ;
235238 }
@@ -252,6 +255,7 @@ public uint PointerId
252255 }
253256 }
254257
258+ private string basePointerName = string . Empty ;
255259 private string pointerName = string . Empty ;
256260
257261 /// <inheritdoc />
You can’t perform that action at this time.
0 commit comments