You need to enable JavaScript to run this app. Unity Oculus Integration包Spatializer未修改 多平台打包报30个错误
优惠活动
大模型
产品
解决方案
定价
更多

Unity Oculus Integration包Spatializer未修改 多平台打包报30个错误

Unity 多平台构建时Oculus空间化模块脚本编译异常

现象说明

  • Unity编辑器内直接运行、调试项目完全正常,无任何报错
  • 切换至Android、PC/Mac/Linux独立平台、通用Windows平台触发构建流程时,Unity会抛出约30个编译错误
  • 所有报错均来自Assets/Imported/Oculus/VR/Spatializer/editor/路径下的Oculus空间化(Spatializer)模块系列脚本,项目从未主动修改过这些文件,也未明确这些脚本的实际用途

已完成的排查操作

  • 在Project Settings > Audio中将默认空间化插件设置为OculusSpatializer
  • 分别执行“为当前场景构建音频几何”“为所有场景重新构建音频几何”操作,问题仍未解决

详细报错日志

Assets\Imported\Oculus\VR\Spatializer\editor\ONSPAudioPluginUpdater.cs(24,19): error CS0234: 命名空间“UnityEditor”中不存在类型或命名空间名“Callbacks”(是否缺少程序集引用?)
Assets\Imported\Oculus\VR\Spatializer\editor\ONSPPropagationSerializationManager.cs(22,19): error CS0234: 命名空间“UnityEditor”中不存在类型或命名空间名“Build”(是否缺少程序集引用?)
Assets\Imported\Oculus\VR\Spatializer\editor\ONSPPropagationSerializationManager.cs(24,19): error CS0234: 命名空间“UnityEditor”中不存在类型或命名空间名“SceneManagement”(是否缺少程序集引用?)
Assets\Imported\Oculus\VR\Spatializer\editor\ONSPPropagationMaterialEditor.cs(29,55): error CS0246: 找不到类型或命名空间名“Editor”(是否缺少 using 指令或程序集引用?)
Assets\Imported\Oculus\VR\Spatializer\editor\ONSPAudioPluginUpdater.cs(32,2): error CS0246: 找不到类型或命名空间名“InitializeOnLoadAttribute”(是否缺少 using 指令或程序集引用?)
Assets\Imported\Oculus\VR\Spatializer\editor\ONSPAudioPluginUpdater.cs(32,2): error CS0246: 找不到类型或命名空间名“InitializeOnLoad”(是否缺少 using 指令或程序集引用?)
Assets\Imported\Oculus\VR\Spatializer\editor\ONSPPropagationMaterialEditor.cs(28,2): error CS0246: 找不到类型或命名空间名“CustomEditorAttribute”(是否缺少 using 指令或程序集引用?)
Assets\Imported\Oculus\VR\Spatializer\editor\ONSPPropagationMaterialEditor.cs(28,2): error CS0246: 找不到类型或命名空间名“CustomEditor”(是否缺少 using 指令或程序集引用?)
Assets\Imported\Oculus\VR\Spatializer\editor\ONSPPropagationMaterialEditor.cs(515,24): error CS0115: “ONSPPropagationMaterialEditor.OnInspectorGUI()”:找不到合适的方法重写
Assets\Imported\Oculus\VR\Spatializer\editor\ONSPAudioPluginUpdater.cs(106,6): error CS0246: 找不到类型或命名空间名“MenuItemAttribute”(是否缺少 using 指令或程序集引用?)
Assets\Imported\Oculus\VR\Spatializer\editor\ONSPAudioPluginUpdater.cs(106,6): error CS0246: 找不到类型或命名空间名“MenuItem”(是否缺少 using 指令或程序集引用?)
Assets\Imported\Oculus\VR\Spatializer\editor\ONSPAudioSourceEditor.cs(29,50): error CS0246: 找不到类型或命名空间名“Editor”(是否缺少 using 指令或程序集引用?)
Assets\Imported\Oculus\VR\Spatializer\editor\ONSPAudioSourceEditor.cs(27,2): error CS0246: 找不到类型或命名空间名“CustomEditorAttribute”(是否缺少 using 指令或程序集引用?)
Assets\Imported\Oculus\VR\Spatializer\editor\ONSPAudioSourceEditor.cs(27,2): error CS0246: 找不到类型或命名空间名“CustomEditor”(是否缺少 using 指令或程序集引用?)
Assets\Imported\Oculus\VR\Spatializer\editor\ONSPAudioSourceEditor.cs(41,23): error CS0115: “OculusSpatializerUserParamsEditor.OnInspectorGUI()”:找不到合适的方法重写
Assets\Imported\Oculus\VR\Spatializer\editor\ONSPPropagationSerializationManager.cs(42,35): error CS0246: 找不到类型或命名空间名“BuildTarget”(是否缺少 using 指令或程序集引用?)
Assets\Imported\Oculus\VR\Spatializer\editor\ONSPPropagationGeometryEditor.cs(28,46): error CS0246: 找不到类型或命名空间名“Editor”(是否缺少 using 指令或程序集引用?)
Assets\Imported\Oculus\VR\Spatializer\editor\ONSPPropagationGeometryEditor.cs(27,2): error CS0246: 找不到类型或命名空间名“CustomEditorAttribute”(是否缺少 using 指令或程序集引用?)
Assets\Imported\Oculus\VR\Spatializer\editor\ONSPPropagationGeometryEditor.cs(27,2): error CS0246: 找不到类型或命名空间名“CustomEditor”(是否缺少 using 指令或程序集引用?)
Assets\Imported\Oculus\VR\Spatializer\editor\ONSPPropagationGeometryEditor.cs(30,23): error CS0115: “ONSPPropagationGeometryEditor.OnInspectorGUI()”:找不到合适的方法重写
Assets\Imported\Oculus\VR\Spatializer\editor\ONSPPropagationSerializationManager.cs(47,6): error CS0246: 找不到类型或命名空间名“MenuItemAttribute”(是否缺少 using 指令或程序集引用?)
Assets\Imported\Oculus\VR\Spatializer\editor\ONSPPropagationSerializationManager.cs(47,6): error CS0246: 找不到类型或命名空间名“MenuItem”(是否缺少 using 指令或程序集引用?)
Assets\Imported\Oculus\VR\Spatializer\editor\ONSPReflectionCustomGUI.cs(25,53): error CS0246: 找不到类型或命名空间名“IAudioEffectPluginGUI”(是否缺少 using 指令或程序集引用?)
Assets\Imported\Oculus\VR\Spatializer\editor\ONSPPropagationSerializationManager.cs(53,6): error CS0246: 找不到类型或命名空间名“MenuItemAttribute”(是否缺少 using 指令或程序集引用?)
Assets\Imported\Oculus\VR\Spatializer\editor\ONSPPropagationSerializationManager.cs(53,6): error CS0246: 找不到类型或命名空间名“MenuItem”(是否缺少 using 指令或程序集引用?)
Assets\Imported\Oculus\VR\Spatializer\editor\ONSPReflectionCustomGUI.cs(42,32): error CS0246: 找不到类型或命名空间名“IAudioEffectPlugin”(是否缺少 using 指令或程序集引用?)
Assets\Imported\Oculus\VR\Spatializer\editor\ONSPReflectionCustomGUI.cs(27,28): error CS0115: “OculusSpatializerReflectionCustomGUI.Name”:找不到合适的方法重写
Assets\Imported\Oculus\VR\Spatializer\editor\ONSPReflectionCustomGUI.cs(32,28): error CS0115: “OculusSpatializerReflectionCustomGUI.Description”:找不到合适的方法重写
Assets\Imported\Oculus\VR\Spatializer\editor\ONSPReflectionCustomGUI.cs(37,28): error CS0115: “OculusSpatializerReflectionCustomGUI.Vendor”:找不到合适的方法重写

内容的提问来源于stack exchange,提问作者corf

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.10.24 02:24:03