diff --git a/libraries/script-engine/src/ScriptManager.cpp b/libraries/script-engine/src/ScriptManager.cpp index a36015e097..2629e31c1b 100644 --- a/libraries/script-engine/src/ScriptManager.cpp +++ b/libraries/script-engine/src/ScriptManager.cpp @@ -261,6 +261,7 @@ ScriptManager::ScriptManager(Context context, const QString& scriptContents, con _fileNameString(fileNameString), _assetScriptingInterface(new AssetScriptingInterface(this)) { + switch (_context) { case Context::CLIENT_SCRIPT: _type = Type::CLIENT; @@ -279,6 +280,9 @@ ScriptManager::ScriptManager(Context context, const QString& scriptContents, con break; } + qRegisterMetaType(); + qRegisterMetaType>(); + _scriptingInterface = std::make_shared(this); if (isEntityServerScript()) { diff --git a/libraries/script-engine/src/ScriptManagerScriptingInterface.h b/libraries/script-engine/src/ScriptManagerScriptingInterface.h index 76cf1cbb1f..20794afc02 100644 --- a/libraries/script-engine/src/ScriptManagerScriptingInterface.h +++ b/libraries/script-engine/src/ScriptManagerScriptingInterface.h @@ -672,7 +672,11 @@ protected: * @param {ConnectionType} [type=2] - Connection type. * @deprecated This function is deprecated and will be removed. */ - Q_INVOKABLE void executeOnScriptThread(std::function function, const Qt::ConnectionType& type = Qt::QueuedConnection ) { _manager->executeOnScriptThread(function, type);} + // V8TODO: Nothing seems to be using this, and it generates: + // hifi.scriptengine: Parameter 1 in method ScriptManagerScriptingInterface :: "executeOnScriptThread" is of type QMetaType::UnknownType + // so removing for now. + // + // Q_INVOKABLE void executeOnScriptThread(std::function function, const Qt::ConnectionType& type = Qt::QueuedConnection ) { _manager->executeOnScriptThread(function, type);} /**jsdoc * @function Script._requireResolve