C# Unity ARFoundation无法找到ARCameraBackground 我试图用统一的AR基础包和ARCy.编译一个Android场景的AR场景。

C# Unity ARFoundation无法找到ARCameraBackground 我试图用统一的AR基础包和ARCy.编译一个Android场景的AR场景。,c#,android,unity3d,C#,Android,Unity3d,除了从我的移动设备实际获取摄像头提要,并且运行内置编辑器返回错误外,所有操作都正常: NullReferenceException: Object reference not set to an instance of an object UnityEngine.XR.ARFoundation.ARCameraBackground.OnDisable () (at Library/PackageCache/com.unity.xr.arfoundation@2.2.0-preview.2/Run

除了从我的移动设备实际获取摄像头提要,并且运行内置编辑器返回错误外,所有操作都正常:

NullReferenceException: Object reference not set to an instance of an object
UnityEngine.XR.ARFoundation.ARCameraBackground.OnDisable () (at Library/PackageCache/com.unity.xr.arfoundation@2.2.0-preview.2/Runtime/AR/ARCameraBackground.cs:192)
我已经查看了它声称存在错误的脚本,并且错误似乎源自此块:

void OnEnable()
        {
            UpdateMaterial();
            m_CameraManager.frameReceived += OnCameraFrameReceived;
            ARSession.stateChanged += OnSessionStateChanged;
        }
我不确定这个错误是从哪里来的,除了相机本身可能无法找到材料来源之外?在这个代码块中,关闭应用程序时也会返回相同的错误:

void OnDisable()
        {
            mode = ARRenderMode.StandardBackground;
            m_CameraManager.frameReceived -= OnCameraFrameReceived;
            ARSession.stateChanged -= OnSessionStateChanged;
            m_CameraSetupThrewException = false;

            // We are no longer setting the projection matrix
            // so tell the camera to resume its normal projection
            // matrix calculations.
            m_Camera.ResetProjectionMatrix();
        }
我正在努力解决为什么AR基金会无法识别摄像机进给来源的问题,我已经对这个问题做了相当多的搜索。当试图在设备上运行它时,它会请求摄像头许可,但提要从不显示