If you are looking for software to use, go to Huajun Software Park! software release AI product list

Hello, if there is a need for software inclusion, please package the software and attach the software name, software introduction, software-related screenshots, software icon, soft copy, business license (if you do not have a business license, please provide the front and back of the corresponding developer ID card and a photo of yourself holding the ID card), and send it to email http://softwaredownload4.com/sbdm/user/login

Close >>

Send to email:news@onlinedown.net

Close >>

Location: Home pagePC softwareSystem softwareMemory management uniwebview
uniwebview

uniwebview 2.9.1 official version

QR code
  • Software licensing: free software
  • Software size: 0.66MB
  • Software rating:
  • Software type: Domestic software
  • Update time: 2024-12-30
  • Application platform: Win All
  • Software language: Simplified Chinese
  • Edition: 2.9.1 Official version

Download the service agreement at the bottom of the page

Software introduction Related topics FAQ Download address

Basic introduction
uniwebview segment first LOGO
The unity UniWebView plug-in calls the native webview in unity to display web pages. Supporting iOS, andorid, and mac, UniWebView is a component written by Chinese people. It also calls the corresponding WebView component to display according to the mobile phone platform, and can also support interaction with javascript. The project is perfect. You can directly see the running effect on mac os and mobile phone systems, and the effect is very good. It is recommended, but I cannot provide the download address.

UniWebView: Applicable to Android, ios and Mac os, and works best on the mobile side. After version 2.0, it supports WP8 and does not support windows desktop system, including editor status.

UniWebView is a plug-in that helps Unity mobile game developers to simply use the system's native WebView in Unity. In many games, WebView is used to display pages and interact with players. However, since Unity3D itself is a multi-platform game engine, it does not and is unlikely to provide a WebView usage interface. The goal of UniWebView is to reduce or eliminate the various troubles and pains associated with using WebView for mobile development on the Unity platform. It uses the WebView corresponding to the native mobile platform, encapsulates it well and adds some common functions to solve some problems that may be encountered in actual game development.

Use Prefab and set URL.

Drag the UniWebViewObject prefab from the UniWebView/Prefab folder, and set the URL on the Inspector (it cannot be set on Windows). You can see the effect on Play on Mac, but it must be packaged into a mobile package on Windows.

uniwebview screenshot

How UniWebView works

Under Mac systems, you can set the following Insets on the UniWebView component to control the size of the web view. Loading in the Start function (Load On Start) and automatically displaying when loading is completed (Auto Show WhenLoad Complete).

In addition to the basic usage of displaying web pages, UniWebView has some other important functions, communicating with Unity scenes, listening to web page events and evaluating some JavaScript.

Main ideas used

uniwebview screenshot

 

The code comes from actual projects and only the main ideas are provided.

The methods for calling Android and iOS platforms are encapsulated in jar and mm files, and the UniWebView class is provided to call these methods. When opening a web page, hang UniWebView as a component on a gameObject. Assign the URL string to the url field in UniWebView, call the Load() method to load the URL, and the Show() method displays it on the screen, corresponding to the Hide() method. When closing, first hide and then destroy the UniWebView component.

uniwebview screenshot

The UniWebView class provides some callback methods, and UniWebViewEdgeInsets is used in this project. By default, the web page is opened in full screen mode, and UniWebViewEdgeInsets offsets the web page. That is, control the area and location of web page display. It should be noted that the value inserted on the Android platform is in pixels. On the iOS platform, because the screen scale values ​​of different models are different, the insertion effect of the same value is different. It is recommended to determine the model and write down the value according to the effect:

uniwebview screenshot

 

FAQ

Close