mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
test models hot-reload
This commit is contained in:
parent
395dc15fb6
commit
22c0f5b9d2
3 changed files with 24 additions and 4 deletions
|
|
@ -208,7 +208,9 @@ void SkeletonConfig::render(
|
|||
model,
|
||||
&skeleton.textures
|
||||
);
|
||||
}
|
||||
} else if (!node->model.name.empty()) {
|
||||
node->model.updateFlag = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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 << "'";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -190,5 +190,9 @@ public:
|
|||
return *appScripts;
|
||||
}
|
||||
|
||||
AssetsManagement& getAssetsManagement() const {
|
||||
return *assets;
|
||||
}
|
||||
|
||||
void detachDebugger();
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue