Пример #1
0
 public void SetSelectedType(string type)
 {
     SelectedType      = Array.IndexOf(TypeStrings, type);
     _providerSettings = GetProviderSettingsFor(type);
     if (_providerSettings != null)
     {
         _providerSettings.Init();
     }
 }
Пример #2
0
            public bool ShowDropDown(ref string eyeTrackingProviderTypeString, string label = null)
            {
                label = label == null?_targetGroup.ToString() : label;

                EditorGUI.BeginChangeCheck();
                var selected = EditorGUILayout.Popup(label, SelectedType, TypeStringDisplayNames);

                if (EditorGUI.EndChangeCheck())
                {
                    SelectedType = selected;
                    eyeTrackingProviderTypeString = TypeString;

                    _providerSettings = GetProviderSettingsFor(eyeTrackingProviderTypeString);
                    if (_providerSettings != null)
                    {
                        _providerSettings.Init();
                    }
                    return(true);
                }

                return(false);
            }