Open Oskang09 opened 3 months ago
You can try:
import { Utils } from "@galacean/engine";
engine.resourceManager.baseUrl = Utils.resolveAbsoluteUrl(window.location.href, ".../../../assets/games/playfulpsyduck");
As for editor, we will add the feature which will support baseUrl soon.
Describe the bug
When set to baseUrl it's throw error when loading i believe because of non-valid URL, and we're unable to specify the loading path so manual work is needed after exported.
Expected behavior Allow us to set relative path when initialise the engine's resource manager.
Alternative way We're able to manually append the path in the exported files,
project.json
and loading project asset when initialise engine. As per screenshot shared it's was able to load fine when append the path ourselves. You can refer to Sample Game to ensure it's work fine after append path.Screenshots
Desktop: