Running iOS 16
Created scene with Reality Composer Added some usdz Added some behaviors Added a custom trigger
All works well in Reality Composer, but poorly on a real device
Tried to create a notify action
And I have managed to figure out the syntax to setup an action against it!
chessBoard.actions.customNotification.onAction = { entity in
print("custom action")
let trans = Transform(translation:SIMD3(x: 0, y: 0, z: +0.1))
entity?.move(to: trans, relativeTo: entity, duration: 2)
}
But for life of me I cannot figure out the syntax to notify this! These don't work, red syntax!! doesn't exist..Apple Docx say it is this...
https://developer.apple.com/documentation/realitykit/creating-a-trigger
let chess = try! ChessSetWithBoardSquare.loadBoard()
chess.notifications.allNotifications[0].post. //No
chess.parent.notifications.allNotifications[0].post //No
arView.scene.anchors.notifications.customNotification.post() //No
arView.scene.notifications.customNotification.post() //No
Nor can I find a reference to the correct syntax at this point in time...