Destroy all entities owned by the given package, and destroy those entities' descendants. Note that there may exist entities from levels in the given package which are owned by other packages (these will not be destroyed).
Parameter
Type
Meaning
package
Reference
Reference to package file.
immediate
bool
If true, entities are destroyed at the end of the event. Otherwise destroy waits to the next frame.
only_ready
bool
If true, only spawned and ready entities will be considered.
Destroy all entities from the primary level of the given package, and optionally destroy those entities' descendants. Note that this function is forceful; all of these entities are destroyed regardless of owning package.
Parameter
Type
Meaning
package
Reference
Reference to package file.
spare_children
bool
Suppress recursive destroy of entities parented to this level
immediate
bool
If true, the level is destroyed at the end of the event. Otherwise destroy waits to the next frame.
only_ready
bool
If true, only spawned and ready entities will be considered.
Return whether there exist in the world any entities owned by the given package. Note that there may exist entities from levels in the given package which are owned by other packages (these will not be considered).
Parameter
Type
Meaning
package
Reference
Reference to package file.
Returnsbool: Returns true if any entities are spawned.
Decrement the load count of a package. If the load count is 0 at the top of next frame, start unloading all files inside the package, destroy all entities owned by the package (see entity.get_owning_package) and those entities' descendants, and destroy all entities whose level data will be unloaded. Note that a level may be in multiple packages, so not all entities spawned from levels in the given package will necessarily be destroyed(i.e.an entity may be owned by a different package,and its data may remain loaded).