我正在尝试为我的 Weebly 网站实现我的统一应用程序。我遵循了本教程:https ://www.youtube.com/watch?v=mf-yNlMLcqA
我有这两个代码:
1.
<!DOCTYPE html>
<html lang="en-us">
<head>
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Unity WebGL Player | LearningEffective</title>
<script
src="https://pamaentertainment.weebly.com/files/theme/Build/UnityLoader.js">
</script>
<script>
var gameInstance = UnityLoader.instantiate("gameContainer",
"https://pamaentertainment.weebly.com/files/theme/Build/Learning Effective
online.json");
</script>
</head>
<body>
<div id="gameContainer" style="width: 720px; height: 1280px; margin: auto">
</div>
</body>
</html>
2.
{
"companyName": "pama",
"productName": "LearningEffective",
"dataUrl": "https://pamaentertainment.weebly.com/files/theme/Build/LearningEffectiveonline.data.unityweb",
"asmCodeUrl": "https://pamaentertainment.weebly.com/files/theme/Build/LearningEffectiveonline.asm.code.unityweb",
"asmMemoryUrl": "https://pamaentertainment.weebly.com/files/theme/Build/LearningEffectiveonline.asm.memory.unityweb",
"asmFrameworkUrl": "https://pamaentertainment.weebly.com/files/theme/Build/LearningEffectiveonline.asm.framework.unityweb",
"TOTAL_MEMORY": 268435456,
"graphicsAPI": ["WebGL 2.0", "WebGL 1.0"],
"webglContextAttributes": {"preserveDrawingBuffer": false},
"backgroundUrl": "https://pamaentertainment.weebly.com/files/theme/Build/LearningEffectiveonline.jpg",
"splashScreenStyle": "Dark",
"backgroundColor": "#FFFFFF"
}
当我尝试加载 Weebly 嵌入代码所在的页面时,Chrome 会弹出一个窗口,其中包含以下内容:Uncaught SyntaxError: Unexpected token < in JSON at position 0.
我怎样才能解决这个问题?