Skip to content

Commit

Permalink
asset manager takes in consideration location
Browse files Browse the repository at this point in the history
  • Loading branch information
tcklpl committed Jun 6, 2024
1 parent 4bbfac6 commit 9928c48
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion game/src/engine/asset/asset_manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export class AssetManager extends Manager<Asset> {
* @returns fetch's Response
*/
private async fetchAssetFile(name: string, asset: AddressableAsset) {
const assetUrl = asset.url;
const assetUrl = window.location.href + asset.url;

const assetRequest = await fetch(assetUrl);
if (!assetRequest.ok) throw new MissingAssetError(`Failed to load asset '${name}'`);
Expand Down

0 comments on commit 9928c48

Please sign in to comment.