引用 WebGL Multiplayer Kit | Network | Unity Asset Store 资源包导入Unity
切换Webgl 网页平台,不压缩
我们从github上拉取Bitbucket 网页模版,选取Metaverse Sample 模版
在本地磁盘路径新建发布文件比如 WebGLServer/metaverase2
下载Nodejs Node.js — Download Node.js®
在通过 cmd node 命令安装服务环境
# clone the project
git clone https://github.com/rio3dstudios/metaverse.git
拉取github上的资源放进WebGLServer/metaverase2内
# open the project directory in windows cmd
cd metaverase2
# install dependencies
npm install
# start the application
npm start
这里我安装失败了,查询链接 npm install 报错 The package-lock.json file was created with an old version of npm, npm WARN o-优快云博客
尝试后,重新安装,启动server.js
下面就是自己开发元宇宙内容,替换public 下内容即可。