private static GazeModifierSettings LoadOrCreateDefaultConfiguration() { bool resourceExists; var settings = GazeModifierSettings.CreateDefaultSettings(out resourceExists); if (resourceExists) { return(settings); } var sdkPath = Path.GetDirectoryName(PathHelper.FindPathToClass(typeof(GazeModifierSettings))); var filePath = PathHelper.PathCombine(sdkPath, GazeModifierSettingsAssetPath); var assetPath = filePath.Replace(Application.dataPath, "Assets"); Debug.Log(assetPath); if (File.Exists(filePath)) { AssetDatabase.Refresh(); settings = AssetDatabase.LoadAssetAtPath <GazeModifierSettings>(assetPath); return(settings); } AssetDatabase.CreateAsset(settings, assetPath); AssetDatabase.SaveAssets(); return(settings); }
public GazeModifierProvider(IEyeTrackingProvider provider, ICameraHelper camera = null) : this(provider, GazeModifierSettings.CreateDefaultSettings(), camera, null) { }
public GazeModifierProvider() : this(TobiiXR_Settings.GetProvider(AssemblyUtils.EyetrackingProviderType(GazeModifierSettings.CreateDefaultSettings().EyetrackingProviderType)), GazeModifierSettings.CreateDefaultSettings(), new CameraHelper()) { }
public void Init() { Settings = LoadOrCreateDefaultConfiguration(); _typeDropDown.SetSelectedType(Settings.EyetrackingProviderType); }
public GazeModifierSettingsExtension() { _gazeModifierSettings = LoadOrCreateDefaultConfiguration(); }
public GazeModifierFilter() : this(GazeModifierSettings.CreateDefaultSettings(), new CameraHelper()) { }