unity 调用RegistryKey类找不到引用
Assets\AA.cs(36,9): error CS0246: The type or namespace name 'RegistryKey' could not be found (are you missing a using directive or an assembly reference?)


解决方案:



在Unity项目中,使用RegistryKey类时出现编译错误CS0246,表示找不到该类型或命名空间。这通常是因为缺少对System.Management.Automation或System的引用。要解决此问题,需要在C#脚本的顶部添加`usingMicrosoft.Win32;`或者确保已正确导入包含RegistryKey的相应DLL。
unity 调用RegistryKey类找不到引用
Assets\AA.cs(36,9): error CS0246: The type or namespace name 'RegistryKey' could not be found (are you missing a using directive or an assembly reference?)


解决方案:



3098
3773

被折叠的 条评论
为什么被折叠?