Post

Replies

Boosts

Views

Activity

Reply to Accessing Resources of other package targets or dependencies using Swift Package Manager
Solution to my question is as follows: "Child" package with C++ code now contains only ‘.c’ and ‘.h’ files linked to each other; «Рarent» package with Swift code contains ‘*.metal’ file with the shaders (now in root directory, but this is easy to fix); Necessary headers in the .metal file are now accessed like this:  #include "../XRKitDefenitions/include/VertexAttributes.h" #include "../XRKitDefenitions/include/TextureIndices.h" Complete ‘Package.swift’ code now looks like this: let package = Package(     name: "XRKit",     platforms: [.macOS(.v10_15), .iOS(.v13)],     products: [         .library(name: "XRKit", targets: ["XRKit"]),         .library(name: "XRKitDefenitions", targets: ["XRKitDefenitions"])     ],     targets: [         .target(             name: "XRKitDefenitions",             path: "Sources/XRKitDefenitions",             cxxSettings: [                 .headerSearchPath("../include/")             ]         ),         .target(             name: "XRKit",             dependencies: ["XRKitDefenitions"],             path: "Sources/XRKit",             resources: [                 .copy("Shaders.metal"),             ]         )     ] ) Create MTLLibrary like this: self.mtlDevice.makeDefaultLibrary(bundle: .module); It was interesting to figure out on my own how it could work for my case :)
May ’22
Reply to RealityKit - Shadows on placement of AnchorEntity
Answer from technical support: Hello Dmitry, Thank you for contacting Developer Technical Support with this incident. The only way to get the automatic grounding shadow in RealityKit is to use the “plane” AnchoringComponent.Target. If you use the “anchor” AnchoringComponent.target, you will not receive the automatic grounding shadow on your content, even if it is an ARPlaneAnchor. You can add your own grounding shadow by using a DirectionalLight with a Shadow and placing a plane beneath your model with an OcclusionMaterial, but you may not be able to achieve the same exact look as the automatic grounding shadows with this approach. I recommend that you file an enhancement request for expanded automatic grounding shadow support for more Target types using Feedback Assistant. Best regards, — Greg Chiste DTS Engineer  Worldwide Developer Relations
Dec ’20
Reply to Peer failed to load asset path in multipeer realitykit
Hello! It seems to me that I have a similar problem.I create an application with a multi-user session, peers download models from local directory on their device, and they can have a different set of models on devices, even if Model A is loaded locally on both peer A and peer B - peer A places it on scene, and peer B sees only "frame" of model A (AnchorEntity + ParentModel (this is a container for ModelEntity) + interaction manipulators), that is, ModelEntity itself (which is a descendant of ParentModel) does not appear. If I catch ARAnchor of Model A from node B in session (_ session:, didAdd anchors:)orsession (_ session:, didUpdate anchors:) methods and try to load model for peer node B, it loads and desired 'network' model A is selected correctly, but only at that ARAnchor creates a second instance of the same model for peer B. Apparently this is the wrong way? How to synchronize the display of models for all devices if resource of the model itself is not set as assets in the static files, but is loaded dynamically from local directory?
May ’20