public void SetSelectedType(string type) { SelectedType = Array.IndexOf(TypeStrings, type); _providerSettings = GetProviderSettingsFor(type); if (_providerSettings != null) { _providerSettings.Init(); } }
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); }