Showing the changes to libraries/script-engine/src/ScriptManagerScriptingInterface.h (1 of 38 files). Show all
Unified · Split
| @@ -407,12 +407,13 @@ public: · 406 unmodified lines | ||
| 407 | 407 | // Entity Script Related methods |
| 408 | 408 | |
| 409 | 409 | /*@jsdoc |
| 410 | − * Checks whether an entity has an entity script running. | |
| 410 | + * Checks whether a specific script URL is running on an entity. | |
| 411 | 411 | * @function Script.isEntityScriptRunning |
| 412 | 412 | * @param {Uuid} entityID - The ID of the entity. |
| 413 | − * @returns {boolean} <code>true</code> if the entity has an entity script running, <code>false</code> if it doesn't. | |
| 413 | + * @param {string} scriptURL - The script URL. | |
| 414 | + * @returns {boolean} <code>true</code> if the entity has the entity script running, <code>false</code> if it doesn't. | |
| 414 | 415 | */ |
| 415 | − Q_INVOKABLE bool isEntityScriptRunning(const EntityItemID& entityID) { return _manager->isEntityScriptRunning(entityID); } | |
| 416 | + Q_INVOKABLE bool isEntityScriptRunning(const EntityItemID& entityID, const QString& scriptURL) { return _manager->isEntityScriptRunning(entityID, scriptURL); } | |
| 416 | 417 | |
| 417 | 418 | /*@jsdoc |
| 418 | 419 | * Manually runs the JavaScript garbage collector which reclaims memory by disposing of objects that are no longer |
| @@ -440,10 +441,25 @@ public: · 21 unmodified lines | ||
| 440 | 441 | /*@jsdoc |
| 441 | 442 | * @function Script.unloadEntityScript |
| 442 | 443 | * @param {Uuid} entityID - Entity ID. |
| 444 | + * @param {string} scriptURL - Script URL to unload. | |
| 443 | 445 | * @param {boolean} [shouldRemoveFromMap=false] - Should remove from map. |
| 444 | 446 | * @deprecated This function is deprecated and will be removed. |
| 445 | 447 | */ |
| 446 | − Q_INVOKABLE void unloadEntityScript(const EntityItemID& entityID, bool shouldRemoveFromMap = false) { _manager->unloadEntityScript(entityID, shouldRemoveFromMap); } | |
| 448 | + Q_INVOKABLE void unloadEntityScript(const EntityItemID& entityID, | |
| 449 | + const QString& scriptURL, | |
| 450 | + bool shouldRemoveFromMap = false) { | |
| 451 | + _manager->unloadEntityScript(entityID, scriptURL, shouldRemoveFromMap); | |
| 452 | + } | |
| 453 | + | |
| 454 | + /*@jsdoc | |
| 455 | + * @function Script.unloadAllEntityScriptsForEntity | |
| 456 | + * @param {Uuid} entityID - Entity ID. | |
| 457 | + * @param {boolean} [shouldRemoveFromMap=false] - Should remove from map. | |
| 458 | + * @deprecated This function is deprecated and will be removed. | |
| 459 | + */ | |
| 460 | + Q_INVOKABLE void unloadAllEntityScriptsForEntity(const EntityItemID& entityID, bool shouldRemoveFromMap = false) { | |
| 461 | + _manager->unloadAllEntityScriptsForEntity(entityID, shouldRemoveFromMap); | |
| 462 | + } | |
| 447 | 463 | |
| 448 | 464 | /*@jsdoc |
| 449 | 465 | * @function Script.unloadAllEntityScripts |