本说明有配图,请确保你的网络畅通,图文模式下阅读更佳。
这是一个简易的 Web Server ,用于方便测试 WebGL 打包后的应用
为了测试 WebGL 打包后的应用,架设一个支持 WebGL 的服务器是每个新手的噩梦,几乎 100% 遇到 MIME Type 设置缺失导致的各种加载失败和错误,前期在真空期找资料也是相当的难受
Build And Run 怪好用的,但也不是长远之计,为了运行还要 Build 一次,想想就抵触的紧。
现在,有了 Tiny Webserve ,随时随地想运行就运行~~
Running | Stoped |
---|---|
-
0 入侵,0 依赖
-
支持设置端口
-
支持指定服务器根节点
-
支持设置 MIME Type (wip ,p=plan)
-
支持多文件夹托管 (wip,p=plan)
-
支持编辑器程序集重新加载后自动恢复运行状态
-
支持在窗口标题展示服务器运行状态
通过 git URL 安装
-
点击
Window->Package Manager
打开 Package Manager 窗口 -
将
https://github.com/Bian-Sh/TinyWebServer/?path=Packages/TinyWebServer
粘贴到 Package Manager 中(大小写敏感) -
想要支持从 git URL 安装,需要使用 Unity 2019.3.4f1 或更高版本
-
在**使用 git URL 安装的成功率较低,请自行选择其他安装方式。
-
指定端口,如果端口被占用你又不知道用哪个,请直接点击 "Random"
-
指定 WebGL 打包的文件夹,这将成为 Web 服务器根节点
-
点击 “Run Server” 运行服务器,此时按钮会转换至 “Stop Server”
-
点击 “Stop Server” 停止服务器
-
点击 “Open Browser” 使用默认浏览器打开 WebGL 应用
这个仓库还很年轻,欢迎大家集思广益提供改进建议,任何有趣的想法笔者都会考虑的哦。
-
本插件的诞生离不开【Unity编辑器开发交流群】
-
本插件灵感来自于平日的困惑,而这个仓库就是导火索啦,撒花★,°:.☆( ̄▽ ̄)/$:.°★ 。
遵循 MIT 开源协议
This is a simple Web Server designed to facilitate the testing of WebGL packaged applications.
Setting up a server that supports WebGL for testing purposes can be a nightmare for beginners. It's almost inevitable to encounter various loading failures and errors due to missing MIME Type settings. Finding resources during the initial stages can be particularly frustrating.
While "Build And Run" is handy, it's not a long-term solution. Having to build every time you want to run something can be off-putting.
Now, with Tiny Web Server, you can run your applications anytime, anywhere!
Running | Stopped |
---|---|
-
Zero intrusion, zero dependencies
-
Customizable port settings
-
Customizable server root directory
-
Support for setting MIME Types (work in progress, planned)
-
Support for multiple directory hosting (work in progress, planned)
-
Automatically restores running state after editor assembly reloads
-
Displays server running status in the window title
Install via git URL
-
Open the Package Manager window by clicking
Window->Package Manager
-
Paste
https://github.com/Bian-Sh/TinyWebServer.git/?path=Packages/TinyWebServer
into the Package Manager (case-sensitive) -
To support git URL installation, Unity 2019.3.4f1 or higher is required
-
Due to lower success rates of git URL installations in China, please consider alternative installation methods.
-
Specify the port. If the port is occupied and you don't know which one to use, simply click "Random"
-
Specify the folder containing the WebGL build. This will be the root directory of the Web server
-
Click "Run Server" to start the server. The button will change to "Stop Server"
-
Click "Stop Server" to stop the server
-
Click "Open Browser" to open the WebGL application in the default browser
This repository is still young. Suggestions for improvements are welcome, and the author will consider any interesting ideas.
-
This plugin would not have been possible without the Unity Editor Development Group
-
The inspiration for this plugin came from everyday challenges, and this repository was the trigger. Cheers! ★,°:.☆( ̄▽ ̄)/$:.°★ .
This project is licensed under the MIT License.