44using Basis . Scripts . Device_Management ;
55using Basis . Scripts . Device_Management . Devices ;
66using Basis . Scripts . Device_Management . Devices . Pairing ;
7+ using Basis . Scripts . Drivers ;
78using Basis . Scripts . TransformBinders . BoneControl ;
89using System ;
910using System . Collections . Generic ;
@@ -158,6 +159,8 @@ public static PanelTabPage TrackerSettingsTab(PanelTabGroup tabGroup)
158159 BasisTrackerPairing . OnPairingsChanged += handleChange ;
159160 BasisTrackerRoleOverride . OnOverridesChanged += handleChange ;
160161 BasisTrackerIdentifyGizmos . OnIdentifyChanged += handleChange ;
162+ BasisLocalAvatarDriver . CalibrationComplete += handleChange ;
163+ BasisAvatarIKStageCalibration . OnFullBodyCalibrated += handleChange ;
161164
162165 tabPage . OnInstanceReleased += ( ) =>
163166 {
@@ -169,6 +172,8 @@ public static PanelTabPage TrackerSettingsTab(PanelTabGroup tabGroup)
169172 BasisTrackerPairing . OnPairingsChanged -= handleChange ;
170173 BasisTrackerRoleOverride . OnOverridesChanged -= handleChange ;
171174 BasisTrackerIdentifyGizmos . OnIdentifyChanged -= handleChange ;
175+ BasisLocalAvatarDriver . CalibrationComplete -= handleChange ;
176+ BasisAvatarIKStageCalibration . OnFullBodyCalibrated -= handleChange ;
172177 state . TrackersContainer = null ;
173178 state . TrackersGroup = null ;
174179 state . TabDescriptor = null ;
@@ -438,16 +443,24 @@ private static void ApplyIdentifyVisual(PanelButton button, BasisInput input)
438443 PanelElementDescriptor descriptor = button . Descriptor ;
439444 if ( descriptor == null || ! descriptor . HasTitle ) return ;
440445
446+ string label ;
441447 if ( BasisTrackerIdentifyGizmos . TryGetColor ( input , out Color color ) )
442448 {
443449 string hex = ColorUtility . ToHtmlStringRGB ( color ) ;
444- descriptor . SetTitle ( $ "<b><color=#{ hex } >{ BasisLocalization . Get ( "trackerLinking.identifyShowing" ) } </color></b>") ;
450+ label = $ "<b><color=#{ hex } >{ BasisLocalization . Get ( "trackerLinking.identifyShowing" ) } </color></b>";
445451 }
446452 else
447453 {
448454 string accentHex = ColorUtility . ToHtmlStringRGB ( ResolveAccentColor ( ) ) ;
449- descriptor . SetTitle ( $ "<b><color=#{ accentHex } >{ BasisLocalization . Get ( "trackerLinking.identifyLabel" ) } </color></b>") ;
455+ label = $ "<b><color=#{ accentHex } >{ BasisLocalization . Get ( "trackerLinking.identifyLabel" ) } </color></b>";
450456 }
457+
458+ if ( input != null && input . TryGetRole ( out BasisBoneTrackedRole role ) )
459+ {
460+ label += $ " <size=85%>{ BasisLocalization . Get ( "trackerLinking.identifyCalibratedRole" , role . ToString ( ) ) } </size>";
461+ }
462+
463+ descriptor . SetTitle ( label ) ;
451464 }
452465
453466 private static Color ResolveAccentColor ( )
@@ -629,6 +642,8 @@ private static void ResetTrackerSettingsDefaults()
629642 BasisSettingsDefaults . PairingDistanceEmaAlpha . ResetToDefault ( ) ;
630643 BasisSettingsDefaults . PairingWeightSmoothing . ResetToDefault ( ) ;
631644 BasisSettingsDefaults . PairingRotationHalfLife . ResetToDefault ( ) ;
645+ BasisTrackerRoleOverride . ClearAll ( ) ;
646+ BasisTrackerPairing . ClearAll ( ) ;
632647 BasisTrackerIdentifyGizmos . ClearAll ( ) ;
633648 }
634649
0 commit comments