Class HotReloader¶
Namespace: Apogee.Scripting
Assembly: Apogee.Scripting.dll
Reloads what changed on disk while the game runs (a development run, the editor). .luau file that a script has required is a module reload (defs.on_change listeners are called); an image or model is imported again (when the project has been imported: imported/index.xml) and .slang file raises mod.xml, a script that only runs once) is listed in
public sealed class HotReloader : IDisposable
Inheritance¶
Implements¶
Inherited Members¶
object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()
Constructors¶
HotReloader(VirtualFileSystem, LuauVm, PackageSet?, TimeSpan?, IReadOnlyList<IAssetImporter>?)¶
public HotReloader(VirtualFileSystem files, LuauVm vm, PackageSet? packages = null, TimeSpan? debounce = null, IReadOnlyList<IAssetImporter>? importers = null)
Parameters¶
files VirtualFileSystem
vm LuauVm
packages PackageSet?
debounce TimeSpan?
importers IReadOnlyList<IAssetImporter>?
What to import again when an asset changes (default:
Methods¶
Dispose()¶
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
Poll()¶
Reloads what changed since the last call (and has been quiet for the debounce time).
public ReloadReport Poll()
Returns¶
AssetsChanged¶
Raised with the paths of assets that changed (and were imported again, if the project is imported), for the host to load them again.
public event Action<IReadOnlyList<string>>? AssetsChanged
Event Type¶
Action<IReadOnlyList<string>>?
ShadersChanged¶
Raised with the paths of shader sources that changed.
public event Action<IReadOnlyList<string>>? ShadersChanged