Skip to content

Profectus / game/persistence / deletePersistent

Function: deletePersistent() ​

deletePersistent(persistent): void

Mark a Persistent as deleted, so it won't be saved and loaded. Since persistent refs must be created during a layer's options func, features can not create persistent refs after evaluating their own options funcs. As a result, it must create any persistent refs it might need. This function can then be called after the options func is evaluated to mark the persistent ref to not be saved or loaded.

Parameters ​

persistent ​

Persistent<State>

Returns ​

void

Defined in ​

profectus/src/game/persistence.ts:245