This is a script used to keep the game object scaled to 2/(Screen.height). If you use it, be sure to NOT use UIOrthoCamera at the same time.
More...
|
| static float | GetPixelSizeAdjustment (GameObject go) |
| | Helper function that figures out the pixel size adjustment for the specified game object. More...
|
| |
| static void | Broadcast (string funcName) |
| | Broadcast the specified message to the entire UI. More...
|
| |
| static void | Broadcast (string funcName, object param) |
| | Broadcast the specified message to the entire UI. More...
|
| |
|
| Scaling | scalingStyle = Scaling.Flexible |
| | Type of scaling used by the UIRoot. More...
|
| |
| int | manualWidth = 1280 |
| | Width of the screen, used when the scaling style is set to Flexible. More...
|
| |
| int | manualHeight = 720 |
| | Height of the screen when the scaling style is set to FixedSize or Flexible. More...
|
| |
| int | minimumHeight = 320 |
| | If the screen height goes below this value, it will be as if the scaling style is set to FixedSize with manualHeight of this value. More...
|
| |
| int | maximumHeight = 1536 |
| | If the screen height goes above this value, it will be as if the scaling style is set to Fixed Height with manualHeight of this value. More...
|
| |
| bool | fitWidth = false |
| | When Constraint is on, controls whether the content must be restricted horizontally to be at least 'manualWidth' wide. More...
|
| |
| bool | fitHeight = true |
| | When Constraint is on, controls whether the content must be restricted vertically to be at least 'Manual Height' tall. More...
|
| |
| bool | adjustByDPI = false |
| | Whether the final value will be adjusted by the device's DPI setting. Used when the Scaling is set to Pixel-Perfect. More...
|
| |
| bool | shrinkPortraitUI = false |
| | If set and the game is in portrait mode, the UI will shrink based on the screen's width instead of height. Used when the Scaling is set to Pixel-Perfect. More...
|
| |
This is a script used to keep the game object scaled to 2/(Screen.height). If you use it, be sure to NOT use UIOrthoCamera at the same time.
| Enumerator |
|---|
| Fit |
|
| Fill |
|
| FitWidth |
|
| FitHeight |
|
| Enumerator |
|---|
| Flexible |
|
| Constrained |
|
| ConstrainedOnMobiles |
|
| virtual void UIRoot.Awake |
( |
| ) |
|
|
protectedvirtual |
| static void UIRoot.Broadcast |
( |
string |
funcName | ) |
|
|
static |
Broadcast the specified message to the entire UI.
| static void UIRoot.Broadcast |
( |
string |
funcName, |
|
|
object |
param |
|
) |
| |
|
static |
Broadcast the specified message to the entire UI.
| static float UIRoot.GetPixelSizeAdjustment |
( |
GameObject |
go | ) |
|
|
static |
Helper function that figures out the pixel size adjustment for the specified game object.
| float UIRoot.GetPixelSizeAdjustment |
( |
int |
height | ) |
|
Calculate the pixel size adjustment at the specified screen height value.
| virtual void UIRoot.OnDisable |
( |
| ) |
|
|
protectedvirtual |
| virtual void UIRoot.OnEnable |
( |
| ) |
|
|
protectedvirtual |
| virtual void UIRoot.Start |
( |
| ) |
|
|
protectedvirtual |
| bool UIRoot.adjustByDPI = false |
Whether the final value will be adjusted by the device's DPI setting. Used when the Scaling is set to Pixel-Perfect.
| bool UIRoot.fitHeight = true |
When Constraint is on, controls whether the content must be restricted vertically to be at least 'Manual Height' tall.
| bool UIRoot.fitWidth = false |
When Constraint is on, controls whether the content must be restricted horizontally to be at least 'manualWidth' wide.
List of all UIRoots present in the scene.
| int UIRoot.manualHeight = 720 |
Height of the screen when the scaling style is set to FixedSize or Flexible.
| int UIRoot.manualWidth = 1280 |
Width of the screen, used when the scaling style is set to Flexible.
| int UIRoot.maximumHeight = 1536 |
If the screen height goes above this value, it will be as if the scaling style is set to Fixed Height with manualHeight of this value.
| int UIRoot.minimumHeight = 320 |
If the screen height goes below this value, it will be as if the scaling style is set to FixedSize with manualHeight of this value.
| Scaling UIRoot.scalingStyle = Scaling.Flexible |
Type of scaling used by the UIRoot.
| bool UIRoot.shrinkPortraitUI = false |
If set and the game is in portrait mode, the UI will shrink based on the screen's width instead of height. Used when the Scaling is set to Pixel-Perfect.
UI Root's active height, based on the size of the screen.
Active scaling type, based on platform.
When the UI scaling is constrained, this controls the type of constraint that further fine-tunes how it's scaled.
| float UIRoot.pixelSizeAdjustment |
|
get |
Pixel size adjustment. Most of the time it's at 1, unless the scaling style is set to FixedSize.
The documentation for this class was generated from the following file:
- D:/Projects/NGUI/Assets/NGUI/Scripts/UI/UIRoot.cs