当前位置:网站首页>Unity and webgl love each other

Unity and webgl love each other

2022-07-07 22:55:00 @Xiao Yang

Set up IIS Local server

Tips : Build local ,UnityWebGL Published in the IIS The server runs the test :

Original blogger link :UnityWebGL Published in the IIS The server runs the test

  1. Open the control panel -> Program -> Enable or close Windows function -> Enable IIS, Check all the options

 Insert picture description here
 Insert picture description here
2. Click... In the upper right corner of the control panel View by - Large icon , Find management tools -Internet Information Services (IIS) Manager
 Insert picture description here
 Insert picture description here
3. New web address Name English casually The physical path is packaged by you WebGL Project path IP The address drop-down box can select Write a port number by yourself , for example 8082 Click ok
 Insert picture description here
 New website
4. Click on the newly established website in the website list , double-click MINE type , Right click - add to , extension :.unityweb,MINE type :application/binary
 Insert picture description here
Be careful :Unity Hit the web package , Remember to check the option , Otherwise, there will be errors (Failed to load resource: the server responded with a status of 404 (Not Found))
 Insert picture description here

1.iis Configuration complete , open web Package error

Example :IIS Unable to read the configuration file due to insufficient permissions solution , If you also encounter this problem, you can refer to the blogger's blog .
Insufficient permissions to read the configuration file
 Insert picture description here

Use Unity Development WebGL Functional categories

1.WebGL Open the locally selected file

 Insert picture description here
be based on unity 2020.3.30f1 Integration of package package , Pro testing is available in the project .
Click to download Demo

2.Unity Input box InputField The input problem

 Insert picture description here

WebGLSupport plug-in unit
Characters will be entered upside down in full screen mode , And can't type Chinese
 Input characters upside down

3.Unity Text Components do not display fonts

unity Pack it up web End ,Text Component default Font Arial The font will not display !!!
Need to go online to download usable fonts , Or find your computer to store fonts locally C Under the plate , Path is C:\Windows\Fonts Import a file in the format .ttf Chinese font , take Arial Replace the font with the imported Chinese font .

  • [ This article will continue to be updated in the future according to the problems encountered in the project ]
原网站

版权声明
本文为[@Xiao Yang]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/188/202207071910380143.html