在本地运行时一切正常,但是在部署时出现此错误。
我有这样的文件夹结构:
我能够获得my_post_markdown.md
进行渲染并链接到[some_sub_folder]/[another_sub_folder]/index.html
。
问题在于index.html
依赖于Build/[some_file.js]
并且无法加载。我在控制台中看到以下内容
我看到的真正错误是:
源“ https://www.greghilston.com/project/global_game_jam_2019/web/Build/UnityLoader.js”的加载失败。网址:10:1
ReferenceError:未定义UnityLoader [了解更多]
如何通过html
文件访问子文件夹的文件?
答案 0 :(得分:1)
我遵循了此博客文章中概述的步骤:
https://medium.com/@aboutin/unity-github-pages-and-file-organization-575ce082b591