mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-11 22:11: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,6 +208,8 @@ void SkeletonConfig::render(
|
||||||
model,
|
model,
|
||||||
&skeleton.textures
|
&skeleton.textures
|
||||||
);
|
);
|
||||||
|
} else if (!node->model.name.empty()) {
|
||||||
|
node->model.updateFlag = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,13 @@
|
||||||
#include "DebuggingServer.hpp"
|
#include "DebuggingServer.hpp"
|
||||||
|
|
||||||
#include "engine/Engine.hpp"
|
#include "assets/AssetsLoader.hpp"
|
||||||
#include "network/Network.hpp"
|
|
||||||
#include "debug/Logger.hpp"
|
|
||||||
#include "coders/json.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;
|
using namespace devtools;
|
||||||
|
|
||||||
|
|
@ -260,6 +264,16 @@ bool DebuggingServer::performCommand(
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return true;
|
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 {
|
} else {
|
||||||
logger.error() << "unsupported command '" << type << "'";
|
logger.error() << "unsupported command '" << type << "'";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -190,5 +190,9 @@ public:
|
||||||
return *appScripts;
|
return *appScripts;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
AssetsManagement& getAssetsManagement() const {
|
||||||
|
return *assets;
|
||||||
|
}
|
||||||
|
|
||||||
void detachDebugger();
|
void detachDebugger();
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue