解决本地运行RMMV的HTML5游戏时出现Failed to load: data/actors.json 问题

在本地运行RMMV的HTML5游戏时出现Failed to load: data/actors.json 问题,在这个网站有讨论http://steamcommunity.com/app/363890/discussions/1/483368526577568252/

原来属于跨域访问的问题,使用服务器就没问题,不用服务器用chrome浏览器好像也有办法http://stackoverflow.com/questions/3102819/disable-same-origin-policy-in-chrome/3177718#3177718

在windows中:

使用如下格式的命令"C:\..\chrome.exe" --disable-web-security --user-agent="Android" --user-data-dir="C:/temp-chrome-eng" --app="file:///C:/apps/index.html"

对我来说,使用"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --user-data-dir="C:/Chrome dev session" --disable-web-security
在添加了Path之后,简化为chrome --user-data-dir="C:/Chrome-DWS-user-data-dir" --disable-web-security
这个格式打开chrome,然后在有提示说“您使用的是不受支持的命令行标记”那个页面的地址栏输入要访问的文件
file:///C:/Users/xxx/Documents/RMMVGames/Project1/index.html
其中xxx为用户名
然后又遇到Failed to load:GameFont错误
我把rpg_core.js中的Graphics.isFontLoaded = function(name)函数的返回值改为true,就没问题了(应该不是网上贴吧上某人说的防火墙问题)
  • 2
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值