public Avrs(string projectPath, Texture2D thumb) { this.projectPath = projectPath; this.thumbnail = thumb; TextureUtils.Bilinear(this.thumbnail, 32, 32); watcher.Path = Path.GetDirectoryName(this.projectPath); watcher.NotifyFilter = NotifyFilters.LastWrite; // Only watch text files. watcher.Filter = "*.avrs"; // Add event handlers. watcher.Changed += Watcher_Changed; watcher.Created += Watcher_Changed; // Begin watching. watcher.EnableRaisingEvents = true; if (UnityEditor.EditorPrefs.HasKey(projectPath)) { this.autoSync = UnityEditor.EditorPrefs.GetBool(projectPath); } }