File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Assets/Scripts/Pinpoint/Utilities Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -32,16 +32,18 @@ public class Settings : MonoBehaviour
3232 #region Probe settings
3333 // Collision detection
3434 private const bool COLLISIONS_DEFAULT = true ;
35- [ FormerlySerializedAs ( "collisionsToggle" ) ] [ SerializeField ] private Toggle _collisionsToggle ;
35+ [ SerializeField ] private Toggle _collisionsToggle ;
3636 public UnityEvent DetectCollisionsChangedEvent ;
3737
3838 public static bool DetectCollisions
3939 {
4040 get { return data . DetectCollisions ; }
4141 set
4242 {
43+ Debug . Log ( $ "Detect collisions set to: { value } ") ;
4344 data . DetectCollisions = value ;
4445 Save ( ) ;
46+ Instance . _collisionsToggle . SetIsOnWithoutNotify ( data . DetectCollisions ) ;
4547 Instance . DetectCollisionsChangedEvent . Invoke ( ) ;
4648 }
4749 }
@@ -673,7 +675,7 @@ public static void Load(string settingsStr)
673675 private void Apply ( )
674676 {
675677 // Load preferences from memory and set UI elements
676- _collisionsToggle . SetIsOnWithoutNotify ( DetectCollisions ) ;
678+ DetectCollisions = data . DetectCollisions ;
677679
678680 _probeAxisToggle . SetIsOnWithoutNotify ( ConvertAPML2Probe ) ;
679681
@@ -851,7 +853,6 @@ private struct InternalData
851853 public Vector3 CameraRotation ;
852854
853855 public string AtlasName ;
854-
855856 }
856857 #endregion
857858}
You can’t perform that action at this time.
0 commit comments