[keel] Fix reloadAsset
This commit is contained in:
parent
ba00d10dfc
commit
6906c66ba7
@ -154,13 +154,12 @@ ox::Result<ox::CStringView> uuidToPath(Context &ctx, ox::UUID const&uuid) noexce
|
|||||||
}
|
}
|
||||||
|
|
||||||
ox::Error reloadAsset(keel::Context &ctx, ox::StringViewCR assetId) noexcept {
|
ox::Error reloadAsset(keel::Context &ctx, ox::StringViewCR assetId) noexcept {
|
||||||
ox::UUIDStr uuidStr;
|
|
||||||
if (beginsWith(assetId, "uuid://")) {
|
if (beginsWith(assetId, "uuid://")) {
|
||||||
return ctx.assetManager.reloadAsset(substr(assetId, 7));
|
return ctx.assetManager.reloadAsset(substr(assetId, 7));
|
||||||
} else {
|
} else {
|
||||||
auto const [uuid, uuidErr] = getUuid(ctx, assetId);
|
auto const [uuid, uuidErr] = getUuid(ctx, assetId);
|
||||||
if (!uuidErr) {
|
if (!uuidErr) {
|
||||||
return ctx.assetManager.reloadAsset(uuidStr);
|
return ctx.assetManager.reloadAsset(uuid.toString());
|
||||||
} else {
|
} else {
|
||||||
return ctx.assetManager.reloadAsset(assetId);
|
return ctx.assetManager.reloadAsset(assetId);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user