【发布时间】:2021-11-28 07:26:14
【问题描述】:
在我的项目中,我只是包装了一个 ARView ,设置了一个配置并在我的真实设备上运行它,当我启动应用程序时,Xcode 会打印出以下错误调试消息。
2021-10-08 17:59:06.476537+0800 RealityKit_Shell[8247:2500396] Metal GPU Frame Capture Enabled
2021-10-08 17:59:06.476699+0800 RealityKit_Shell[8247:2500396] Metal API Validation Enabled
2021-10-08 17:59:07.219091+0800 RealityKit_Shell[8247:2500396] [AssetTypes] Registering library (/System/Library/PrivateFrameworks/CoreRE.framework/default.metallib) that already exists in shader manager. Library will be overwritten.
2021-10-08 17:59:07.374894+0800 RealityKit_Shell[8247:2500396] [Assets] Resolving material name 'engine:BuiltinRenderGraphResources/AR/suFeatheringCreateMergedOcclusionMask.rematerial' as an asset path -- this usage is deprecated; instead provide a valid bundle
2021-10-08 17:59:07.395024+0800 RealityKit_Shell[8247:2500396] [Assets] Resolving material name 'engine:BuiltinRenderGraphResources/AR/arKitPassthrough.rematerial' as an asset path -- this usage is deprecated; instead provide a valid bundle
2021-10-08 17:59:07.395929+0800 RealityKit_Shell[8247:2500396] [Assets] Resolving material name 'engine:BuiltinRenderGraphResources/AR/drPostAndComposition.rematerial' as an asset path -- this usage is deprecated; instead provide a valid bundle
2021-10-08 17:59:07.396642+0800 RealityKit_Shell[8247:2500396] [Assets] Resolving material name 'engine:BuiltinRenderGraphResources/AR/arSegmentationComposite.rematerial' as an asset path -- this usage is deprecated; instead provide a valid bundle
2021-10-08 17:59:07.397378+0800 RealityKit_Shell[8247:2500396] [Assets] Resolving material name 'engine:BuiltinRenderGraphResources/AR/arInPlacePostProcessCombinedPermute0.rematerial' as an asset path -- this usage is deprecated; instead provide a valid bundle
2021-10-08 17:59:07.398275+0800 RealityKit_Shell[8247:2500396] [Assets] Resolving material name 'engine:BuiltinRenderGraphResources/AR/arInPlacePostProcessCombinedPermute1.rematerial' as an asset path -- this usage is deprecated; instead provide a valid bundle
2021-10-08 17:59:07.398553+0800 RealityKit_Shell[8247:2500396] [Assets] Resolving material name 'engine:BuiltinRenderGraphResources/AR/arInPlacePostProcessCombinedPermute2.rematerial' as an asset path -- this usage is deprecated; instead provide a valid bundle
2021-10-08 17:59:07.409981+0800 RealityKit_Shell[8247:2500396] [Assets] Resolving material name 'engine:BuiltinRenderGraphResources/AR/arInPlacePostProcessCombinedPermute3.rematerial' as an asset path -- this usage is deprecated; instead provide a valid bundle
2021-10-08 17:59:07.410269+0800 RealityKit_Shell[8247:2500396] [Assets] Resolving material name 'engine:BuiltinRenderGraphResources/AR/arInPlacePostProcessCombinedPermute4.rematerial' as an asset path -- this usage is deprecated; instead provide a valid bundle
2021-10-08 17:59:07.410527+0800 RealityKit_Shell[8247:2500396] [Assets] Resolving material name 'engine:BuiltinRenderGraphResources/AR/arInPlacePostProcessCombinedPermute5.rematerial' as an asset path -- this usage is deprecated; instead provide a valid bundle
2021-10-08 17:59:07.410791+0800 RealityKit_Shell[8247:2500396] [Assets] Resolving material name 'engine:BuiltinRenderGraphResources/AR/arInPlacePostProcessCombinedPermute6.rematerial' as an asset path -- this usage is deprecated; instead provide a valid bundle
2021-10-08 17:59:07.411055+0800 RealityKit_Shell[8247:2500396] [Assets] Resolving material name 'engine:BuiltinRenderGraphResources/AR/arInPlacePostProcessCombinedPermute7.rematerial' as an asset path -- this usage is deprecated; instead provide a valid bundle
2021-10-08 17:59:07.411755+0800 RealityKit_Shell[8247:2500396] [Foundation.Serialization] Json Parse Error line 18: Json Deserialization; unknown member 'EnableARProbes' - skipping.
2021-10-08 17:59:07.411781+0800 RealityKit_Shell[8247:2500396] [Foundation.Serialization] Json Parse Error line 20: Json Deserialization; unknown member 'EnableGuidedFilterOcclusion' - skipping.
2021-10-08 17:59:07.542203+0800 RealityKit_Shell[8247:2500396] throwing -10878
2021-10-08 17:59:07.543025+0800 RealityKit_Shell[8247:2500396] throwing -10878
2021-10-08 17:59:07.543069+0800 RealityKit_Shell[8247:2500396] throwing -10878
2021-10-08 17:59:07.543108+0800 RealityKit_Shell[8247:2500396] throwing -10878
2021-10-08 17:59:07.543155+0800 RealityKit_Shell[8247:2500396] throwing -10878
2021-10-08 17:59:07.543307+0800 RealityKit_Shell[8247:2500396] throwing -10878
2021-10-08 17:59:07.543690+0800 RealityKit_Shell[8247:2500396] throwing -10878
2021-10-08 17:59:07.543802+0800 RealityKit_Shell[8247:2500396] throwing -10878
2021-10-08 17:59:07.543918+0800 RealityKit_Shell[8247:2500396] throwing -10878
2021-10-08 17:59:07.880459+0800 RealityKit_Shell[8247:2500606] [espresso] Warning: padding deconvolution PersonSeg/decoder/deconv_64/conv2d_transpose:0 in SAME mode will not be pad-invariant for all resolutions
2021-10-08 17:59:07.880514+0800 RealityKit_Shell[8247:2500606] [espresso] Warning: padding deconvolution PersonSeg/decoder/deconv_32/conv2d_transpose:0 in SAME mode will not be pad-invariant for all resolutions
2021-10-08 17:59:07.880530+0800 RealityKit_Shell[8247:2500606] [espresso] Warning: padding deconvolution PersonSeg/decoder/deconv_16/conv2d_transpose:0 in SAME mode will not be pad-invariant for all resolutions
2021-10-08 17:59:07.880546+0800 RealityKit_Shell[8247:2500606] [espresso] Warning: padding deconvolution PersonSeg/decoder/deconv_8/conv2d_transpose:0 in SAME mode will not be pad-invariant for all resolutions
2021-10-08 17:59:07.880559+0800 RealityKit_Shell[8247:2500606] [espresso] Warning: padding deconvolution PersonSeg/decoder/deconv_4/conv2d_transpose:0 in SAME mode will not be pad-invariant for all resolutions
2021-10-08 17:59:07.880572+0800 RealityKit_Shell[8247:2500606] [espresso] Warning: padding deconvolution PersonSeg/decoder/deconv_2/conv2d_transpose:0 in SAME mode will not be pad-invariant for all resolutions
2021-10-08 17:59:08.396967+0800 RealityKit_Shell[8247:2500615] [Session] ARSession <0x133d75bd0>: ARSessionDelegate is retaining 11 ARFrames. This can lead to future camera frames being dropped.
2021-10-08 17:59:08.410508+0800 RealityKit_Shell[8247:2500613] [Session] ARSession <0x133d75bd0>: ARSessionDelegate is retaining 12 ARFrames. This can lead to future camera frames being dropped.
2021-10-08 17:59:08.425793+0800 RealityKit_Shell[8247:2500615] [Session] ARSession <0x133d75bd0>: ARSessionDelegate is retaining 13 ARFrames. This can lead to future camera frames being dropped.
2021-10-08 17:59:08.443037+0800 RealityKit_Shell[8247:2500711] [Session] ARSession <0x133d75bd0>: ARSessionDelegate is retaining 14 ARFrames. This can lead to future camera frames being dropped.
2021-10-08 17:59:08.460984+0800 RealityKit_Shell[8247:2500613] [Session] ARSession <0x133d75bd0>: ARSessionDelegate is retaining 15 ARFrames. This can lead to future camera frames being dropped.
add ancora
2021-10-08 17:59:08.520791+0800 RealityKit_Shell[8247:2500613] [Technique] ARWorldTrackingTechnique <0x138ae1710>: World tracking performance is being affected by resource constraints [2]
下面是我的简单代码
struct ARViewWrapped: UIViewRepresentable {
let arManager: ARManager
func makeUIView(context: Context) -> some UIView {
arManager.setupARView()
return arManager.arView
}
func updateUIView(_ uiView: UIViewType, context: Context) {
}
}
我的经理班:
class ARManager: NSObject, ARSessionDelegate , ObservableObject{
static var shared = ARManager()
var arView = ARView(frame: .zero, cameraMode: .ar, automaticallyConfigureSession: false)
func setupARView(){
let configuration = ARWorldTrackingConfiguration()
configuration.planeDetection = [.vertical]
configuration.environmentTexturing = .automatic
configuration.isAutoFocusEnabled = true
if type(of: configuration).supportsFrameSemantics(.sceneDepth) {
configuration.frameSemantics = .personSegmentationWithDepth
}
arView.debugOptions = []
arView.session.delegate = self
arView.session.run(configuration, options: .resetTracking)
}
func session(_ session: ARSession, didAdd anchors: [ARAnchor]) {
print("add ancora ")
}
}
Ar 体验开始正确,但我只是想知道为什么会打印出所有这些消息错误。
【问题讨论】:
标签: swift xcode augmented-reality arkit realitykit