Showing the changes to libraries/entities/src/EntityScriptingInterface.cpp (1 of 62 files). Show all
Unified · Split
| @@ -1038,6 +1038,15 @@ bool EntityScriptingInterface::isLoaded(const QUuid& id) { · 1037 unmodified lines | ||
| 1038 | 1038 | return toReturn; |
| 1039 | 1039 | } |
| 1040 | 1040 | |
| 1041 | +bool EntityScriptingInterface::isAddedEntity(const QUuid& id) { | |
| 1042 | + bool toReturn = false; | |
| 1043 | + _entityTree->withReadLock([&] { | |
| 1044 | + EntityItemPointer entity = _entityTree->findEntityByEntityItemID(id); | |
| 1045 | + toReturn = (bool)entity; | |
| 1046 | + }); | |
| 1047 | + return toReturn; | |
| 1048 | +} | |
| 1049 | + | |
| 1041 | 1050 | QSizeF EntityScriptingInterface::textSize(const QUuid& id, const QString& text) { |
| 1042 | 1051 | return EntityTree::textSize(id, text); |
| 1043 | 1052 | } |