For H5 projects published directly, http-server or anywhere -p
When you open it at this time, you will find that the page is as follows:
Solution: PlayerSetting->Player->Publishing Setting
Check DecomPression Fallback
It can work normally after being released at this time, but it is not full screen:
In the released H5 project, edit index.html file
Directly modify the style of canvas:
<canvas id="unity-canvas" style="width: 100%; height: 100%; background: #231F20"></canvas>
Or insert code in <Script> :
var canvas = document.getElementById("#unity-canvas");
canvas.height = document.documentElement.clientHeight;
canvas.width = document.documentElement.clientWidth;
This can solve the problem, but it is troublesome to modify it manually after each release. Later, we will study the automatic processing during release.
Or there are other full-screen settings.
Read More:
- Canvas generates poster todataurl with error [Solved]
- [How to Solve] canvas.save(Canvas.ALL_SAVE_FLAG)
- Chart.js Error: “Canvas is already in use. Chart …must be destroyed before the canvas can be reused”
- [Solved] Flyter uses screenutil to obtain screen width and height initialization error
- Solve the problem of incorrect display of dialogfragment width
- [Fixed] Typeerror: error 1009: Cannot access properties or methods referenced by an empty object
- How to Solve screenfull plug-in Error (Version Issues)
- How to Solve Error Swift 4 Expression type ‘@value CGRect’ is ambiguous without more context
- [Solved] ViewBinding Error: java.lang.ClassCastException: android.widget.RelativeLayout cannot be
- Vue Error in callback for immediate watcher “height”: “TypeError: Cannot read property ‘style’ of
- The use of vue-echarts and compilation error solutions
- Android Phone Record Screen Error: failed to get surface
- How to Solve VS2019 Re-generate Error
- [Solved] Milvus Error: [ERROR][SERVER][TakeToEUse milvus.has_collection to verify whether the collection exists
- Apktool back compilation error [How to Solve]
- Vue Import Baidu map error: BMap is not defined, eslint BMap reports an error
- [Solved] Unity3d reports an error using the opencv plug-in: unsafe code may only appear if compiling with/unsafe.
- error: (-215:Assertion failed) size.width>0 && size.height>0 in function ‘cv::imshow‘
- Weboffice Warning: OLE error 800A01A8 [How to Solve]
- Angularjs1 exception error:[$injector:unpr]