在我的 iOS 应用程序中,我想使用新的 Reality Composer 引入 AR 的一部分。
在我的项目中,我使用以下代码加载场景:
let arView = ARView.init(frame: frame)
// Configure the AR session for horizontal plane tracking.
let arConfiguration = ARWorldTrackingConfiguration()
arConfiguration.planeDetection = .horizontal
arView.session.run(arConfiguration)
arView.session.delegate = self
self.view.addSubview(arView)
Experience.loadSceneAsync{ [weak self] scene, error in
print("Error \(String(describing: error))")
guard let scene = scene else { return }
arView.scene.addAnchor(scene)
// THIS IS THE entity that i want to edit programmatically
scene.Label
Run Code Online (Sandbox Code Playgroud)
该“scene.label”在我的场景中的文本对象,我想设置文本编程。
我怎样才能做到这一点?这是可能的?
提前致谢
编辑:
Xcode 10 beta 6解决了这个问题
我正在使用新的xcode 10更新我的ios 12应用程序,但Fabric框架使应用程序在开始时崩溃.
我只在启动屏幕上运行代码和应用程序崩溃.
在我的AppDelegate中:
#import <Fabric/Fabric.h>
#import <Answers/Answers.h>
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[Fabric with:@[[Answers class]]];
return YES;
}
Run Code Online (Sandbox Code Playgroud)
这是出现的日志:
+[NSRecursiveLock dictionary]: unrecognized selector sent to class 0x233a30580
(lldb)
Run Code Online (Sandbox Code Playgroud)
这是崩溃日志
线程0名称:调度队列:com.apple.main-thread线程0崩溃:0 libsystem_kernel.dylib 0x00000001fa545104 pthread_kill + 8 1 libsystem_pthread.dylib 0x00000001fa5c4a00 pthread_kill $ VARIANT $ armv81 + 296 2
libsystem_c.dylib 0x00000001fa49cd78 abort + 140 3
libc ++ abi.dylib 0x00000001f9b64f78 __cxa_bad_cast + 0 4 libc ++ abi.dylib 0x00000001f9b65120 default_unexpected_handler + 8480()+ 0 5 …
我正在尝试使用 Xcode 12 beta 6 在装有 iOS 13 的 iPhone 上测试我的项目。
应用程序在启动时崩溃,这是日志中的消息:
dyld:启动,加载依赖库 DYLD_LIBRARY_PATH=/usr/lib/system/introspection DYLD_INSERT_LIBRARIES=/Developer/usr/lib/libBacktraceRecording.dylib:/Developer/usr/lib/libMainThreadChecker.dylib:/Developer/Library/PrivateFrameworks/GPUTools。 framework/libglInterpose.dylib:/usr/lib/libMTLCapture.dylib:/Developer/Library/PrivateFrameworks/DTDDISupport.framework/libViewDebuggerSupport.dylib (lldb)
有人可以帮助我吗?谢谢