閲覧ありがとうございます。
Unityで吐いたWebGLをPWAで動かしてみた
を参考にしたく、サンプルをダウンロードし
index.htmlで開きました。
開きましたところファイルが見つかりませんと表示されます。
想像なのですが、<%= htmlWebpackPlugin.files.publicPath %>が上手く取得できていないのかと思いました
ですが、フォルダ内にhtmlWebpackPluginがどこにあるか探しましたが分かりません。
file:///T:/app/webgl/PWAForUnitySample-master/%3C%=%20htmlWebpackPlugin.files.publicPath%20%%3Estatic/unitybuild/TemplateData/style.css
html
1<link rel="unity-icon" type="image/png" sizes="154x130" href="<%= htmlWebpackPlugin.files.publicPath %>static/unitybuild/TemplateData/progressLogo.Light.png"> 2 <link rel="unity-icon" type="image/png" sizes="154x130" href="<%= htmlWebpackPlugin.files.publicPath %>static/unitybuild/TemplateData/progressLogo.Dark.png">
結果的にこのindex.htmlを動かすには何かが足りない気がします、ただ何が足りないのでしょうか?Vue.jsを動かすために何か必要なのでしょうか?よろしくお願いいたします。
また、Unityしか触ったことがなくC#の知識しかありません。
参考になるサイトがございましたら教えてください。
追記(調べていること)
開発環境が整っていないのかなと思いましたので現在調べています。
Node.jsをサーバーサイドで立ち上げる必要がある?
開発環境が必要だと知りPWAForUnitySample-masterフォルダへ移動し、
$ npm run dev
をしました。
行けるかと思いましたが駄目でした。
$ npm run dev > PWAforUnity@1.0.0 dev C:\Users\y_hirama\Desktop\PWAForUnitySample-master > node build/dev-server.js internal/modules/cjs/loader.js:584 throw err; ^ Error: Cannot find module 'C:\Users\y_hirama\Desktop\PWAForUnitySample-master\build\dev-server.js' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:582:15) at Function.Module._load (internal/modules/cjs/loader.js:508:25) at Function.Module.runMain (internal/modules/cjs/loader.js:754:12) at startup (internal/bootstrap/node.js:283:19) at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! PWAforUnity@1.0.0 dev: `node build/dev-server.js` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the PWAforUnity@1.0.0 dev script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\y_hirama\AppData\Roaming\npm-cache\_logs\2019-05-22T11_16_53_520Z-debug.log
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。