Load Rayfield
Add the following line at the top of your script to load the Rayfield library.Enable configuration saving
Configuration saving lets Rayfield automatically persist and restore element values across sessions.Enable ConfigurationSaving in CreateWindow
Set
ConfigurationSaving.Enabled to true and provide a FileName when calling CreateWindow.Set a unique flag on each element
Every element that supports configuration saving has a
Flag field. Make sure each flag is unique to avoid conflicts.