Prefix assets path with "assets/".
PiperOrigin-RevId: 823044312 Change-Id: I0bde4428bd1992d6d4356e107dac471fa7cdecc6
This commit is contained in:
committed by
Copybara-Service
parent
18e60369f3
commit
1fd9b47fea
@@ -30,7 +30,8 @@ ABSL_FLAG(int, window_height, 700, "Window height");
|
||||
ABSL_FLAG(std::string, model_file, "", "MuJoCo model file.");
|
||||
|
||||
static std::vector<std::byte> LoadAsset(std::string_view path) {
|
||||
std::ifstream file(std::string(path), std::ios::binary | std::ios::ate);
|
||||
std::string fullpath = std::string("assets/") + std::string(path);
|
||||
std::ifstream file(fullpath, std::ios::binary | std::ios::ate);
|
||||
if (!file.is_open()) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user