当我尝试构建应用程序时,它会引发以下错误: Assets/Workshop/Scripts/TextureLoader.cs(114,31): error CS1105: `TextureLoader.GetFilesWithExtensions(this DirectoryInfo, params string[])': Extension methods must be声明为静态
// Gets the list of files in the directory by extention and filters for our specified ones (images)
public IEnumerable<FileInfo> GetFilesWithExtensions (this DirectoryInfo dir, params string[] extensions) {
IEnumerable<FileInfo> files = dir.GetFiles();
return files.Where(f => extensions.Contains(f.Extension));
}
public bool isFinishedLoadingFirstTexture() {
return mFinishedFirstTexture;
}
我已经将其更改为标题中的公共静态类。