Coherent UI for Unity3D  2.5.3
A modern user interface library for games
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events Pages
CoherentUIView Class Reference

Component containing a Coherent UI view. More...

+ Inheritance diagram for CoherentUIView:

Public Member Functions

void SetMousePosition (int x, int y)
 Sets the mouse position. Note Coherent UI (0,0) is the upper left corner of the screen. More...
 
void DestroyView ()
 Destroy this view. Destroys the Coherent UI view and removes the CoherentUIView component from its game object. Any usage of the view after this method is undefined behaviour. More...
 
delegate void ViewDestroyedHandler ()
 Handler for ViewDestroyed event. More...
 
void Resize (int width, int height)
 Resize the view to the specified width and height. More...
 
void Reload (bool ignoreCache)
 Request reload of this view. More...
 
bool GetCamDimensions (out int x, out int y)
 Returns the camera dimensions of the current view. More...
 

Properties

string Page [get, set]
 Gets or sets the URL of the view More...
 
int Width [get, set]
 Gets or sets the width of the view. More...
 
int Height [get, set]
 Gets or sets the height of the view. More...
 
int XPos [get, set]
 Gets or sets the X position of the overlay view. More...
 
int YPos [get, set]
 Gets or sets the Y position of the overlay view. More...
 
bool ScaleToFit [get, set]
 Gets or sets if the view will scale it's content to fit it's size. More...
 
bool EnableWebGLSupport [get, set]
 If enabled, WebGL will be supported in the view. More...
 
string InitialScript [get, set]
 Gets or sets the initial JavaScript code to be executed when the view JavaScript engine is created. More...
 
CoherentViewInputState InputState [get, set]
 Gets or sets the inbput state of the overlay view. More...
 
bool IsTransparent [get, set]
 Gets or sets a value indicating whether the view is transparent. More...
 
bool SupportClickThrough [get, set]
 Gets or sets a value indicating whether this view CoherentUIView supports click through. More...
 
float ClickThroughAlphaThreshold [get, set]
 Gets or sets the alpha threshold for click through checks. More...
 
bool ClickToFocus [get, set]
 When enabled, allows a view to take input focus when clicked with the left mouse button. More...
 
DrawOrder DrawAfterPostEffects [get, set]
 Gets or sets a value indicating whether this view is drawn after post effects. More...
 
bool FlipY [get, set]
 Gets or sets a value indicating whether the Y axis of this view should be flipped. More...
 
virtual bool ReceivesInput [get, set]
 Gets or sets a value indicating whether this view receives input. All automatic processing and reading of this property is done in the LateUpdate() / OnGUI() callbacks in Unity, letting you do all your logic for View focus in Update(). More...
 
bool InterceptAllEvents [get, set]
 Gets or sets a value indicating whether this view intercepts all events and sends a message for each event. More...
 
bool EnableBindingAttribute [get, set]
 Gets or sets a value indicating whether this CoherentUIView enables usage of the CoherentMethod attribute in components in the host GameObject. When true, the all components in the host GameObject are inspected for the CoherentMethod attribute (in the Awake() function) and the decorated methods are automatically bound when the ReadyForBindings event is received. When false, the attribute does nothing. More...
 
bool IsIndependentOfZBuffer [get, set]
 Gets or sets a value indicating whether this view is z-buffer independent. If it is set to true, the view is rendered on top of everything. More...
 
bool ShowJavaScriptDialogs [get, set]
 Gets or sets a value indicating whether dialogs will be drawn when a JavaScript message is received (e.g. alert, prompt, auth credentials). More...
 
bool ForceSoftwareRendering [get, set]
 Forces the view to use software rendering. For GPU-bound applications software views might be a good choice. CSS 3D transforms, WebGL and accelerated Canvas don't work with software views. This option doesn't work with OnDemand. More...
 
bool IgnoreDisplayDensity [get, set]
 Defines whether the Android device's display density will affect the scale of the View. When set to true, the displayed content in the view will match its pixel size. For example, a device with 1.5 scale factor will display a div of 100px in a 200px View on about 75% of surface if IgnoreDisplayDensity is set to false. If IgnoreDisplayDensity is set to true, the same div of 100px displayed in a 200px View will occupy exactly 50% of the View. More...
 
bool UseCameraDimensions [get, set]
 If checked, the view will use the camera's width and height More...
 
bool CorrectGamma [get, set]
 Gets or sets a value indicating whether this view should have gamma corrected. More...
 
bool EnableIME [get, set]
 Gets or sets a value indicating whether the view should have IME enabled More...
 
View View [get]
 Gets the underlying Coherent.UI.View instance. More...
 
UnityViewListener.CoherentUI_OnViewCreated OnViewCreated
 Occurs when the underlying Coherent.UI.View is created More...
 
UnityViewListener.CoherentUI_OnReadyForBindings OnReadyForBindings
 Occurs when the view bindings should be registered. More...
 
UnityViewListener Listener [get]
 Gets the underlying UnityViewListener for this view. More...
 
virtual bool IsSurfaceView [get]
 whether this is a mobile surface view More...
 

Events

ViewDestroyedHandler OnViewDestroyed
 Occurs when the view has been destroyed and the CoherentUIView component is going to be removed from the game object. More...
 

Detailed Description

Component containing a Coherent UI view.

Member Function Documentation

void CoherentUIView.DestroyView ( )
inline

Destroy this view. Destroys the Coherent UI view and removes the CoherentUIView component from its game object. Any usage of the view after this method is undefined behaviour.

bool CoherentUIView.GetCamDimensions ( out int  x,
out int  y 
)
inline

Returns the camera dimensions of the current view.

void CoherentUIView.Reload ( bool  ignoreCache)
inline

Request reload of this view.

Parameters
ignoreCacheIgnore cache for the reload.
void CoherentUIView.Resize ( int  width,
int  height 
)
inline

Resize the view to the specified width and height.

Parameters
widthNew width for the view.
heightNew height for the view.
void CoherentUIView.SetMousePosition ( int  x,
int  y 
)
inline

Sets the mouse position. Note Coherent UI (0,0) is the upper left corner of the screen.

Parameters
xX coordinate of the mouse.
yY coordinate of the mouse.
delegate void CoherentUIView.ViewDestroyedHandler ( )

Handler for ViewDestroyed event.

Property Documentation

float CoherentUIView.ClickThroughAlphaThreshold
getset

Gets or sets the alpha threshold for click through checks.

The alpha threshold for click through checks.

bool CoherentUIView.ClickToFocus
getset

When enabled, allows a view to take input focus when clicked with the left mouse button.

true if this view takes input focus when clicked; otherwise, false.

bool CoherentUIView.CorrectGamma
getset

Gets or sets a value indicating whether this view should have gamma corrected.

true if gamma is corrected; otherwise, false.

DrawOrder CoherentUIView.DrawAfterPostEffects
getset

Gets or sets a value indicating whether this view is drawn after post effects.

AfterPostEffects if the view is drawn after post effects; otherwise, false.

Exceptions
System.ApplicationExceptionIs thrown when the application exception.
bool CoherentUIView.EnableBindingAttribute
getset

Gets or sets a value indicating whether this CoherentUIView enables usage of the CoherentMethod attribute in components in the host GameObject. When true, the all components in the host GameObject are inspected for the CoherentMethod attribute (in the Awake() function) and the decorated methods are automatically bound when the ReadyForBindings event is received. When false, the attribute does nothing.

true if usage of the CoherentMethod is enabled; otherwise, false.

bool CoherentUIView.EnableIME
getset

Gets or sets a value indicating whether the view should have IME enabled

true if IME is enabled; otherwise, false.

bool CoherentUIView.EnableWebGLSupport
getset

If enabled, WebGL will be supported in the view.

The EnableWebGLSupport property.

bool CoherentUIView.FlipY
getset

Gets or sets a value indicating whether the Y axis of this view should be flipped.

true if the Y axis is flipped; otherwise, false.

bool CoherentUIView.ForceSoftwareRendering
getset

Forces the view to use software rendering. For GPU-bound applications software views might be a good choice. CSS 3D transforms, WebGL and accelerated Canvas don't work with software views. This option doesn't work with OnDemand.

Not available for iOS.

true if the view is to use software rendering; otherwise false.

int CoherentUIView.Height
getset

Gets or sets the height of the view.

The height.

bool CoherentUIView.IgnoreDisplayDensity
getset

Defines whether the Android device's display density will affect the scale of the View. When set to true, the displayed content in the view will match its pixel size. For example, a device with 1.5 scale factor will display a div of 100px in a 200px View on about 75% of surface if IgnoreDisplayDensity is set to false. If IgnoreDisplayDensity is set to true, the same div of 100px displayed in a 200px View will occupy exactly 50% of the View.

true if the view ignores the device's display density; otherwise false.

string CoherentUIView.InitialScript
getset

Gets or sets the initial JavaScript code to be executed when the view JavaScript engine is created.

The script.

CoherentViewInputState CoherentUIView.InputState
getset

Gets or sets the inbput state of the overlay view.

The new input state.

bool CoherentUIView.InterceptAllEvents
getset

Gets or sets a value indicating whether this view intercepts all events and sends a message for each event.

true if view intercepts all events; otherwise, false.

Exceptions
System.ApplicationExceptionIs thrown when the property is modified and the view has already been created
bool CoherentUIView.IsIndependentOfZBuffer
getset

Gets or sets a value indicating whether this view is z-buffer independent. If it is set to true, the view is rendered on top of everything.

true if it is independent; otherwise false.

virtual bool CoherentUIView.IsSurfaceView
get

whether this is a mobile surface view

bool CoherentUIView.IsTransparent
getset

Gets or sets a value indicating whether the view is transparent.

true if this instance is transparent; otherwise, false.

Exceptions
System.ApplicationExceptionIs thrown when the property is modified and the view has already been created
UnityViewListener CoherentUIView.Listener
get

Gets the underlying UnityViewListener for this view.

The listener.

UnityViewListener.CoherentUI_OnReadyForBindings CoherentUIView.OnReadyForBindings
addremove

Occurs when the view bindings should be registered.

UnityViewListener.CoherentUI_OnViewCreated CoherentUIView.OnViewCreated
addremove

Occurs when the underlying Coherent.UI.View is created

string CoherentUIView.Page
getset

Gets or sets the URL of the view

The loaded URL of view

virtual bool CoherentUIView.ReceivesInput
getset

Gets or sets a value indicating whether this view receives input. All automatic processing and reading of this property is done in the LateUpdate() / OnGUI() callbacks in Unity, letting you do all your logic for View focus in Update().

true if this view receives input; otherwise, false.

bool CoherentUIView.ScaleToFit
getset

Gets or sets if the view will scale it's content to fit it's size.

The scale-to-fit property.

bool CoherentUIView.ShowJavaScriptDialogs
getset

Gets or sets a value indicating whether dialogs will be drawn when a JavaScript message is received (e.g. alert, prompt, auth credentials).

true if a dialog is to be shown automatically; otherwise false.

bool CoherentUIView.SupportClickThrough
getset

Gets or sets a value indicating whether this view CoherentUIView supports click through.

true if supports click through; otherwise, false.

Exceptions
System.ApplicationExceptionIs thrown when the property is modified and the view has already been created
bool CoherentUIView.UseCameraDimensions
getset

If checked, the view will use the camera's width and height

true if we want to use camera's width and height; otherwise false.

View CoherentUIView.View
get

Gets the underlying Coherent.UI.View instance.

The underlying Coherent.UI.View instance.

int CoherentUIView.Width
getset

Gets or sets the width of the view.

The width.

int CoherentUIView.XPos
getset

Gets or sets the X position of the overlay view.

The X position.

int CoherentUIView.YPos
getset

Gets or sets the Y position of the overlay view.

The Y position.

Event Documentation

ViewDestroyedHandler CoherentUIView.OnViewDestroyed

Occurs when the view has been destroyed and the CoherentUIView component is going to be removed from the game object.