Hi
I want to be able to start, stop and step thru the action in my metal view. I have this button in my interface:
Button(action: { model.pause.toggle() })
{ model.pause ? Text("Run") : Text("Pause") }
and this property in my model
@Published var pause: Bool = false {
didSet {
metalView.enableSetNeedsDisplay = pause
metalView.isPaused = pause
}
}
On initialisation, my renderer sets ‘pause’ to true. And everything works! Yayyyy! The app starts with the metal view paused and I can toggle the action on and off using the button.
The only problem is that I get this new message in my console (which doesn’t appear when I omit this code):
BOOL _NSPersistentUIDeleteItemAtFileURL(NSURL *const __strong) Failed to stat item: file:///Users/tchelyzt/Library/Containers/fr.norme.ville.MyApp/Data/Library/Saved%20Application%20State/fr.norme.ville.MyApp.savedState/restorecount.plist**
fr.norme.ville.MyApp is the bundle identifier
Thanks for any assistance