[](有图片附件)图集用的atlas 在LayaAir里可以正常跑,但是发布后,运行报错 Failed to load file.Cross origin requests are

Failed to load file:///H:/WeChatQ1Snake/release/layaweb/v1.0.0/res/atlas/images.atlas: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https.
i.send @ laya.core.min.js:5
laya.core.min.js:6 [warn]Retry to load: H:/WeChatQ1Snake/release/layaweb/v1.0.0/res/atlas/images.atlas
laya.core.min.js:5 Failed to load file:///H:/WeChatQ1Snake/release/layaweb/v1.0.0/res/atlas/images.atlas: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https.
i.send @ laya.core.min.js:5
laya.core.min.js:6 [error]Failed to load: H:/WeChatQ1Snake/release/layaweb/v1.0.0/res/atlas/images.atlas
main.min.js:1 Uncaught TypeError: BackGround is not a constructor
    at t.onLoaded (main.min.js:1)
    at t.onLoaded2 (main.min.js:1)
    at e.run (laya.core.min.js:1)
    at e.i.event (laya.core.min.js:1)
    at e.n._endLoad (laya.core.min.js:6)
    at e (laya.core.min.js:6)
    at e.<anonymous> (laya.core.min.js:6)
    at e.runWith (laya.core.min.js:1)
    at e.i.event (laya.core.min.js:1)
    at e.i.onError (laya.core.min.js:5)
index.html:1 Access to Image at 'file:///H:/WeChatQ1Snake/release/layaweb/v1.0.0/map/tile_map.png' from origin 'null' has been blocked by CORS policy: Invalid response. Origin 'null' is therefore not allowed access.
laya.core.min.js:6 [warn]Retry to load: H:/WeChatQ1Snake/release/layaweb/v1.0.0/map/tile_map.png
index.html:1 Access to Image at 'file:///H:/WeChatQ1Snake/release/layaweb/v1.0.0/map/tile_map.png' from origin 'null' has been blocked by CORS policy: Invalid response. Origin 'null' is therefore not allowed access.
laya.core.min.js:6 [error]Failed to load: H:/WeChatQ1Snake/release/layaweb/v1.0.0/map/tile_map.png
已邀请:

sky391153342

赞同来自: Prajna

跨域问题

要回复问题请先

商务合作
商务合作