Next: Miscellaneous-Utilities, Previous: REPL, Up: Utilities [Contents][Index]
(use-modules (sly utils live-reload))
The live-reload module enables Sly programs to react to changes in the file system and reload assets automatically, which is useful when using external programs such as an image editor or map editor. This makes it easy to see the changes made to game assets quickly.
Return a new procedure that re-applies proc
whenever the
associated file is modified. The new procedure returns a signal
(see Signals) that contains the return value of proc
. The
first argument to proc
must be a file name string.
A simple polling method is used to test for updates. Files are polled
every polling-interval
ticks (120 by default).