@@ -193,6 +193,8 @@ public async Task UpdateMenu() {
193193 CancelAimingButton . SetInteractivity ( true ) ;
194194 await CheckDoneBtn ( ) ;
195195 AimingInProgress = true ;
196+ if ( currentObject is ActionObject3D actionObject3D )
197+ actionObject3D . UnHighlight ( ) ;
196198 UpdateCurrentPointLabel ( ) ;
197199 if ( ! automaticPointSelection && currentObject . ActionObjectMetadata . ObjectModel . Mesh . FocusPoints . Count > 1 ) {
198200 NextButton . SetInteractivity ( true ) ;
@@ -207,6 +209,8 @@ public async Task UpdateMenu() {
207209 SavePositionButton . SetInteractivity ( false , "No aiming in progress" ) ;
208210 CancelAimingButton . SetInteractivity ( false , "No aiming in progress" ) ;
209211 AimingInProgress = false ;
212+ if ( currentObject is ActionObject3D actionObject3D )
213+ actionObject3D . Highlight ( ) ;
210214 }
211215 } else if ( ! currentObject . IsRobot ( ) && ! currentObject . IsCamera ( ) && currentObject . ActionObjectMetadata . ObjectModel != null ) {
212216 UpdatePositionBlockVO . SetActive ( true ) ;
@@ -271,6 +275,8 @@ public async void CancelAiming() {
271275 try {
272276 await WebsocketManager . Instance . CancelObjectAiming ( ) ;
273277 AimingInProgress = false ;
278+ if ( currentObject is ActionObject3D actionObject3D )
279+ actionObject3D . Highlight ( ) ;
274280 if ( currentFocusPoint >= 0 && currentFocusPoint < spheres . Count )
275281 spheres [ currentFocusPoint ] . UnHighlight ( ) ;
276282 UpdateCurrentPointLabel ( ) ;
@@ -319,6 +325,8 @@ await WebsocketManager.Instance.ObjectAimingStart(currentObject.Data.Id,
319325 SavePositionButton . SetInteractivity ( true ) ;
320326 CancelAimingButton . SetInteractivity ( true ) ;
321327 StartObjectFocusingButton . SetInteractivity ( false , "Already aiming" ) ;
328+ if ( currentObject is ActionObject3D actionObject3D )
329+ actionObject3D . UnHighlight ( ) ;
322330 if ( ! automaticPointSelection && currentObject . ActionObjectMetadata . ObjectModel . Mesh . FocusPoints . Count > 1 ) {
323331 NextButton . SetInteractivity ( true ) ;
324332 PreviousButton . SetInteractivity ( true ) ;
@@ -332,6 +340,8 @@ await WebsocketManager.Instance.ObjectAimingStart(currentObject.Data.Id,
332340 CurrentPointLabel . text = "" ;
333341 currentFocusPoint = - 1 ;
334342 AimingInProgress = false ;
343+ if ( currentObject is ActionObject3D actionObject3D )
344+ actionObject3D . Highlight ( ) ;
335345 if ( ex . Message == "Focusing already started." ) { //TODO HACK! find better solution
336346 FocusObjectDone ( ) ;
337347 }
@@ -368,6 +378,8 @@ public async void FocusObjectDone() {
368378 PreviousButton . SetInteractivity ( false , "No aiming in progress" ) ;
369379 SavePositionButton . SetInteractivity ( false , "No aiming in progress" ) ;
370380 StartObjectFocusingButton . SetInteractivity ( true ) ;
381+ if ( currentObject is ActionObject3D actionObject3D )
382+ actionObject3D . Highlight ( ) ;
371383 AimingInProgress = false ;
372384 } catch ( Base . RequestFailedException ex ) {
373385 Base . NotificationsModernUI . Instance . ShowNotification ( "Failed to focus object" , ex . Message ) ;
@@ -485,4 +497,13 @@ public void OpenSteppingMenu() {
485497 EditorHelper . EnableCanvasGroup ( CanvasGroup , false ) ;
486498 }
487499
500+ public void Highlight ( bool enable ) {
501+ if ( currentObject != null && currentObject is ActionObject3D actionObject ) {
502+ if ( enable )
503+ actionObject . Highlight ( ) ;
504+ else
505+ actionObject . UnHighlight ( ) ;
506+ }
507+ }
508+
488509}
0 commit comments