C# 클래스 UWKWebView, html-ui-unity

WebView component used to render and interact with web content
상속: MonoBehaviour
파일 보기 프로젝트 열기: ufz-vislab/html-ui-unity 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
ContentSizeChanged ContentSizeChangedDelegate
CurrentHeight int
CurrentWidth int
JSConsole JSConsoleDelegate
JSMessageReceived JSMessageReceivedDelegate
LoadFinished LoadFinishedDelegate
LoadProgress LoadProgressDelegate
MaxHeight int
MaxWidth int
NewViewRequested RequestNewViewDelegate
ScrollSensitivity float
TitleChanged TitleChangedDelegate
URL string
URLChanged URLChangedDelegate

공개 메소드들

메소드 설명
AddToGameObject ( GameObject gameObject, string url = "", int maxWidth = 1024, int maxHeight = 1024 ) : UWKWebView,

Dynamically adds a UWKWebView component to a GameObject with initialization that isn't possible using GameObject.AddComponent due to lack of constructor parameters

Awake ( ) : void

Initializes the UWKWebView, registers default delagates, and creates textures for the page and icon to lack of constructor parameters

Back ( ) : void

Moves back in the page history

ClearCookies ( ) : void

Clears all user cookies

CloseInspector ( ) : void

Closes the Web Inspector window Associated with this View

DisableInput ( ) : void

Globally enables mouse and keyboard input from webviews

DrawTextIME ( int x, int y ) : void

Draws the text IME for Chinese, Japanese, Korean languages

DrawTexture ( Rect position, bool alphaBlend = true ) : void
EnableInput ( ) : void

Globally disabled mouse and keyboard input from webviews

EvaluateJavascript ( string javascript, JSEvalDelegate callback = null ) : void

Evaluates Javascript on the page Example with return value: EvaluateJavascript("document.title", (value) => { Debug.Log(value); });

Forward ( ) : void

Moves forward in the page history

GetApplicationDataURL ( ) : string
Hide ( ) : void

Hide the page, the page will no longer be rendered by the web rendering process saving CPU time

IMEFocusIn ( UWKMessage, &msg ) : void

Page is focusing a text entry area in IME mode

IMEFocusOut ( ) : void

Page is removing focus for text area in IME mode

IconChanged ( int width, int height, byte bytes ) : void

Sets the icon texture to the given width/height and image bytes

LoadHTML ( string HTML, string baseURL = "" ) : void

Loads the specified HTML string directly in the view, can be used for generating web content on the fly

LoadURL ( string url ) : void

Navigate the view to the specified URL (http://, file://, etc)

Navigate ( Navigation, n ) : void

Navigates forward or back in the page history

OnDestroy ( ) : void
ProcessKeyboard ( Event keyEvent ) : void

Process a Unity keyboard event

ProcessMouse ( Vector3 mousePos ) : void

Process the mouse given mousePos coordinates

Reload ( ) : void

Reloads the current page contents

SendJSMessage ( string msgName ) : void

Sends a Javascript message to the page

SendJSMessage ( string msgName, object>.Dictionary msgValues ) : void

Sends a Javascript message to the page

SendJSMessage ( string msgName, object value ) : void

Sends a Javascript message to the page

SendJSMessage ( string msgName, string key, object value ) : void

Sends a Javascript message to the page

SetAlphaMask ( bool enabled ) : void

Enabled or disables alpha mask rendering of view

SetCurrentSize ( int width, int height ) : void

Sets the current width and height of the UWKWebView

SetFrameRate ( int framerate ) : void

Sets the framerate that the view is rendered at in the web rendering process Default is 30fps, to set 60fps you would call view.SetFrameRate(60); Please note that higher fps settings will increase CPU load

SetScrollPosition ( int x, int y ) : void

Sets the page's sceoll positon

SetTextCaretColor ( uint color ) : void

Sets the color of the text input caret in the form of 0xAARRGGBB Default is opaque black 0xFF000000

SetUserAgent ( string agent = "" ) : void

Sets the user agent the browser reports, setting the agent to "" will use the default uWebKit agent

SetZoomFactor ( float zoom ) : void

Sets the zoom factor of the page

Show ( ) : void

Makes the page visible, the page will be updated and refreshed by the Wweb rendering process

ShowInspector ( ) : void

Opens a platform Web Inspector Window

Start ( ) : void
Stop ( ) : void

Stops the current page load

Update ( ) : void
Visible ( ) : bool

Gets whether the page is visible or not

contentSizeChanged ( UWKWebView, view, int width, int height ) : void
jsConsole ( UWKWebView, view, string message, int line, string source ) : void
jsMessageReceived ( UWKWebView, view, string message, string json, object>.Dictionary values ) : void
loadFinished ( UWKWebView, view ) : void
loadProgress ( UWKWebView, view, int progress ) : void
newViewRequested ( UWKWebView, view, string url ) : void
titleChanged ( UWKWebView, view, string title ) : void
urlChanged ( UWKWebView, view, string url ) : void

메소드 상세

AddToGameObject() 공개 정적인 메소드

Dynamically adds a UWKWebView component to a GameObject with initialization that isn't possible using GameObject.AddComponent due to lack of constructor parameters
public static AddToGameObject ( GameObject gameObject, string url = "", int maxWidth = 1024, int maxHeight = 1024 ) : UWKWebView,
gameObject GameObject
url string
maxWidth int
maxHeight int
리턴 UWKWebView,

Awake() 공개 메소드

Initializes the UWKWebView, registers default delagates, and creates textures for the page and icon to lack of constructor parameters
public Awake ( ) : void
리턴 void

Back() 공개 메소드

Moves back in the page history
public Back ( ) : void
리턴 void

ClearCookies() 공개 정적인 메소드

Clears all user cookies
public static ClearCookies ( ) : void
리턴 void

CloseInspector() 공개 메소드

Closes the Web Inspector window Associated with this View
public CloseInspector ( ) : void
리턴 void

DisableInput() 공개 정적인 메소드

Globally enables mouse and keyboard input from webviews
public static DisableInput ( ) : void
리턴 void

DrawTextIME() 공개 메소드

Draws the text IME for Chinese, Japanese, Korean languages
public DrawTextIME ( int x, int y ) : void
x int
y int
리턴 void

DrawTexture() 공개 메소드

public DrawTexture ( Rect position, bool alphaBlend = true ) : void
position Rect
alphaBlend bool
리턴 void

EnableInput() 공개 정적인 메소드

Globally disabled mouse and keyboard input from webviews
public static EnableInput ( ) : void
리턴 void

EvaluateJavascript() 공개 메소드

Evaluates Javascript on the page Example with return value: EvaluateJavascript("document.title", (value) => { Debug.Log(value); });
public EvaluateJavascript ( string javascript, JSEvalDelegate callback = null ) : void
javascript string
callback JSEvalDelegate
리턴 void

Forward() 공개 메소드

Moves forward in the page history
public Forward ( ) : void
리턴 void

GetApplicationDataURL() 공개 정적인 메소드

public static GetApplicationDataURL ( ) : string
리턴 string

Hide() 공개 메소드

Hide the page, the page will no longer be rendered by the web rendering process saving CPU time
public Hide ( ) : void
리턴 void

IMEFocusIn() 공개 메소드

Page is focusing a text entry area in IME mode
public IMEFocusIn ( UWKMessage, &msg ) : void
msg UWKMessage,
리턴 void

IMEFocusOut() 공개 메소드

Page is removing focus for text area in IME mode
public IMEFocusOut ( ) : void
리턴 void

IconChanged() 공개 메소드

Sets the icon texture to the given width/height and image bytes
public IconChanged ( int width, int height, byte bytes ) : void
width int
height int
bytes byte
리턴 void

LoadHTML() 공개 메소드

Loads the specified HTML string directly in the view, can be used for generating web content on the fly
public LoadHTML ( string HTML, string baseURL = "" ) : void
HTML string
baseURL string
리턴 void

LoadURL() 공개 메소드

Navigate the view to the specified URL (http://, file://, etc)
public LoadURL ( string url ) : void
url string
리턴 void

Navigate() 공개 메소드

Navigates forward or back in the page history
public Navigate ( Navigation, n ) : void
n Navigation,
리턴 void

OnDestroy() 공개 메소드

public OnDestroy ( ) : void
리턴 void

ProcessKeyboard() 공개 메소드

Process a Unity keyboard event
public ProcessKeyboard ( Event keyEvent ) : void
keyEvent Event
리턴 void

ProcessMouse() 공개 메소드

Process the mouse given mousePos coordinates
public ProcessMouse ( Vector3 mousePos ) : void
mousePos Vector3
리턴 void

Reload() 공개 메소드

Reloads the current page contents
public Reload ( ) : void
리턴 void

SendJSMessage() 공개 메소드

Sends a Javascript message to the page
public SendJSMessage ( string msgName ) : void
msgName string
리턴 void

SendJSMessage() 공개 메소드

Sends a Javascript message to the page
public SendJSMessage ( string msgName, object>.Dictionary msgValues ) : void
msgName string
msgValues object>.Dictionary
리턴 void

SendJSMessage() 공개 메소드

Sends a Javascript message to the page
public SendJSMessage ( string msgName, object value ) : void
msgName string
value object
리턴 void

SendJSMessage() 공개 메소드

Sends a Javascript message to the page
public SendJSMessage ( string msgName, string key, object value ) : void
msgName string
key string
value object
리턴 void

SetAlphaMask() 공개 메소드

Enabled or disables alpha mask rendering of view
public SetAlphaMask ( bool enabled ) : void
enabled bool
리턴 void

SetCurrentSize() 공개 메소드

Sets the current width and height of the UWKWebView
public SetCurrentSize ( int width, int height ) : void
width int
height int
리턴 void

SetFrameRate() 공개 메소드

Sets the framerate that the view is rendered at in the web rendering process Default is 30fps, to set 60fps you would call view.SetFrameRate(60); Please note that higher fps settings will increase CPU load
public SetFrameRate ( int framerate ) : void
framerate int
리턴 void

SetScrollPosition() 공개 메소드

Sets the page's sceoll positon
public SetScrollPosition ( int x, int y ) : void
x int
y int
리턴 void

SetTextCaretColor() 공개 메소드

Sets the color of the text input caret in the form of 0xAARRGGBB Default is opaque black 0xFF000000
public SetTextCaretColor ( uint color ) : void
color uint
리턴 void

SetUserAgent() 공개 메소드

Sets the user agent the browser reports, setting the agent to "" will use the default uWebKit agent
public SetUserAgent ( string agent = "" ) : void
agent string
리턴 void

SetZoomFactor() 공개 메소드

Sets the zoom factor of the page
public SetZoomFactor ( float zoom ) : void
zoom float
리턴 void

Show() 공개 메소드

Makes the page visible, the page will be updated and refreshed by the Wweb rendering process
public Show ( ) : void
리턴 void

ShowInspector() 공개 메소드

Opens a platform Web Inspector Window
public ShowInspector ( ) : void
리턴 void

Start() 공개 메소드

public Start ( ) : void
리턴 void

Stop() 공개 메소드

Stops the current page load
public Stop ( ) : void
리턴 void

Update() 공개 메소드

public Update ( ) : void
리턴 void

Visible() 공개 메소드

Gets whether the page is visible or not
public Visible ( ) : bool
리턴 bool

contentSizeChanged() 공개 메소드

public contentSizeChanged ( UWKWebView, view, int width, int height ) : void
view UWKWebView,
width int
height int
리턴 void

jsConsole() 공개 메소드

public jsConsole ( UWKWebView, view, string message, int line, string source ) : void
view UWKWebView,
message string
line int
source string
리턴 void

jsMessageReceived() 공개 메소드

public jsMessageReceived ( UWKWebView, view, string message, string json, object>.Dictionary values ) : void
view UWKWebView,
message string
json string
values object>.Dictionary
리턴 void

loadFinished() 공개 메소드

public loadFinished ( UWKWebView, view ) : void
view UWKWebView,
리턴 void

loadProgress() 공개 메소드

public loadProgress ( UWKWebView, view, int progress ) : void
view UWKWebView,
progress int
리턴 void

newViewRequested() 공개 메소드

public newViewRequested ( UWKWebView, view, string url ) : void
view UWKWebView,
url string
리턴 void

titleChanged() 공개 메소드

public titleChanged ( UWKWebView, view, string title ) : void
view UWKWebView,
title string
리턴 void

urlChanged() 공개 메소드

public urlChanged ( UWKWebView, view, string url ) : void
view UWKWebView,
url string
리턴 void

프로퍼티 상세

ContentSizeChanged 공개적으로 프로퍼티

Delegate fired when the content size of the page has changed
public ContentSizeChangedDelegate ContentSizeChanged
리턴 ContentSizeChangedDelegate

CurrentHeight 공개적으로 프로퍼티

Gets the current height of the UWKWebView
public int CurrentHeight
리턴 int

CurrentWidth 공개적으로 프로퍼티

Gets the current width of the UWKWebView
public int CurrentWidth
리턴 int

JSConsole 공개적으로 프로퍼티

Delegate fired when the page has output something to console.log
public JSConsoleDelegate JSConsole
리턴 JSConsoleDelegate

JSMessageReceived 공개적으로 프로퍼티

Delegate fired when the page has received a Javascript message
public JSMessageReceivedDelegate JSMessageReceived
리턴 JSMessageReceivedDelegate

LoadFinished 공개적으로 프로퍼티

Delegate fired when the page has finished loaded
public LoadFinishedDelegate LoadFinished
리턴 LoadFinishedDelegate

LoadProgress 공개적으로 프로퍼티

Delegate fired when the page has updated the loading progress 0-100
public LoadProgressDelegate LoadProgress
리턴 LoadProgressDelegate

MaxHeight 공개적으로 프로퍼티

Max height of the UWKWebView, defined at creation time. It is possible to set the view's current height to be equal or smaller than this value
public int MaxHeight
리턴 int

MaxWidth 공개적으로 프로퍼티

Max width of the UWKWebView, defined at creation time. It is possible to set the view's current width to be equal or smaller than this value
public int MaxWidth
리턴 int

NewViewRequested 공개적으로 프로퍼티

Delegate fired when the page has requested a popup window be created
public RequestNewViewDelegate NewViewRequested
리턴 RequestNewViewDelegate

ScrollSensitivity 공개적으로 프로퍼티

Used to make the scroll wheel/trackpad more sensitive
public float ScrollSensitivity
리턴 float

TitleChanged 공개적으로 프로퍼티

Delegate fired when the Title of the page has changed
public TitleChangedDelegate TitleChanged
리턴 TitleChangedDelegate

URL 공개적으로 프로퍼티

The initial URL to load
public string URL
리턴 string

URLChanged 공개적으로 프로퍼티

Delegate fired when the URL of the page has changed
public URLChangedDelegate URLChanged
리턴 URLChangedDelegate