diff --git a/src/animation/rigging.cpp b/src/animation/rigging.cpp index ceaed3365..d5e36a82c 100644 --- a/src/animation/rigging.cpp +++ b/src/animation/rigging.cpp @@ -208,7 +208,9 @@ void SkeletonConfig::render( model, &skeleton.textures ); - } + } else if (!node->model.name.empty()) { + node->model.updateFlag = true; + } } } diff --git a/src/devtools/DebuggingServer.cpp b/src/devtools/DebuggingServer.cpp index cb50c87a8..ecb85bead 100644 --- a/src/devtools/DebuggingServer.cpp +++ b/src/devtools/DebuggingServer.cpp @@ -1,9 +1,13 @@ #include "DebuggingServer.hpp" -#include "engine/Engine.hpp" -#include "network/Network.hpp" -#include "debug/Logger.hpp" +#include "assets/AssetsLoader.hpp" #include "coders/json.hpp" +#include "data/dv.hpp" +#include "debug/Logger.hpp" +#include "engine/AssetsManagement.hpp" +#include "engine/Engine.hpp" +#include "io/path.hpp" +#include "network/Network.hpp" using namespace devtools; @@ -260,6 +264,16 @@ bool DebuggingServer::performCommand( } }); return true; + } else if (type == "hot-reload") { + if (!map.has("file")) { + return false; + } + logger.info() << "hot-reload: " << map["file"].asString(); + int count = engine.getAssetsManagement().acquireBackgroundLoader().addReload( + map["file"].asString() + ); + logger.info() << "enqueued to reload: " << count; + return false; } else { logger.error() << "unsupported command '" << type << "'"; } diff --git a/src/engine/Engine.hpp b/src/engine/Engine.hpp index 153acf4df..668ce360b 100644 --- a/src/engine/Engine.hpp +++ b/src/engine/Engine.hpp @@ -190,5 +190,9 @@ public: return *appScripts; } + AssetsManagement& getAssetsManagement() const { + return *assets; + } + void detachDebugger(); };