Post

Replies

Boosts

Views

Activity

Accessing NotificationTriggers in URL loaded Reality Composer scenes
I'm trying to access .notifications.allNotifications of a scene I'm loading via a UIDocumentPicker.If i'm doing it with a known scene in the XCode bundle it's really straight forward (code snippet below), because I can store them in a global var of type TestScene.NotificationTrigger. As this is defined in TestScene.swift (that XCode creates when you import the Reality Composer scene into the project) it's not obvious if there's a generic type of RealityComposerScene.NotificationTrigger I can cast these to when loading programatically?var allNotificationTriggers: [TestScene.NotificationTrigger]! override func viewDidAppear(_ animated: Bool) { super.viewDidAppear(animated) let testAnchor = try! TestScene.loadScene() allNotificationTriggers = testAnchor.notifications.allNotifications )
0
0
538
Apr ’20