mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-04-24 04:58:59 -05:00
Add new Lua function to remove all loaded assets (closes #2812). Fix crash that would occur when trying to unload an asset that requires a root asset
This commit is contained in:
@@ -92,8 +92,25 @@ public:
|
||||
*/
|
||||
std::vector<const Asset*> allAssets() const;
|
||||
|
||||
/**
|
||||
* Returns all root assets, which are assets that have been loaded directly from the
|
||||
* profile or by calling the #add method.
|
||||
*
|
||||
* \return A list of all root assets
|
||||
*/
|
||||
std::vector<const Asset*> rootAssets() const;
|
||||
|
||||
std::vector<const ResourceSynchronization*> allSynchronizations() const;
|
||||
|
||||
/**
|
||||
* Returns whether the provided \p asset has been loaded directly by the user or
|
||||
* loaded through a profile file.
|
||||
*
|
||||
* \param asset The asset that should be tested
|
||||
* \return Whether the \p asset has been loaded directly or included in a profile
|
||||
*/
|
||||
bool isRootAsset(const Asset* asset) const;
|
||||
|
||||
/**
|
||||
* Loads the provided \p asset as a child of the provided \p parent. Loading an asset
|
||||
* means that asset file gets executed and the meta information is extracted from it.
|
||||
|
||||
Reference in New Issue
Block a user