Create an entity with the given class name
| 36 | |
| 37 | // Create an entity with the given class name |
| 38 | static TestEntity create(const std::string& className) |
| 39 | { |
| 40 | TestEntity result; |
| 41 | result.node = algorithm::createEntityByClassName(className); |
| 42 | result.spawnArgs = &result.node->getEntity(); |
| 43 | |
| 44 | // Enable undo |
| 45 | scene::addNodeToContainer(result.node, GlobalMapModule().getRoot()); |
| 46 | |
| 47 | return result; |
| 48 | } |
| 49 | |
| 50 | // Access the spawnargs |
| 51 | Entity& args() { return *spawnArgs; } |
nothing calls this directly
no test coverage detected