Skip to content

Commit

Permalink
feat: fix invalid loading settings (#298)
Browse files Browse the repository at this point in the history
  • Loading branch information
rk132 authored Jun 19, 2024
2 parents 088fdbf + 77d8a0c commit ebb120a
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,17 @@ public void CreateGUI()
headerLabel.text = AVATAR_LOADER;

var useEyeAnimationsToggle = rootVisualElement.Q<Toggle>(USE_EYE_ANIMATIONS_TOGGLE);
useEyeAnimationsToggle.value = EditorPrefs.GetBool(EYE_ANIMATION_SAVE_KEY);
useEyeAnimations = EditorPrefs.GetBool(EYE_ANIMATION_SAVE_KEY);
useEyeAnimationsToggle.value = useEyeAnimations;
useEyeAnimationsToggle.RegisterCallback<ChangeEvent<bool>>(evt =>
{
useEyeAnimations = evt.newValue;
EditorPrefs.SetBool(EYE_ANIMATION_SAVE_KEY, useEyeAnimations);
});

var useVoiceToAnimToggle = rootVisualElement.Q<Toggle>(USE_VOICE_TO_ANIMATION_TOGGLE);
useVoiceToAnimToggle.value = EditorPrefs.GetBool(VOICE_TO_ANIM_SAVE_KEY);
useVoiceToAnim = EditorPrefs.GetBool(VOICE_TO_ANIM_SAVE_KEY);
useVoiceToAnimToggle.value = useVoiceToAnim;
useVoiceToAnimToggle.RegisterCallback<ChangeEvent<bool>>(evt =>
{
useVoiceToAnim = evt.newValue;
Expand Down

0 comments on commit ebb120a

Please sign in to comment.