A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.unity3d.com/Packages/com.unity.ugui@1.0/api/UnityEngine.UI.CanvasScaler.html below:

Class CanvasScaler Inherited Members

Component.GetComponentIndex()

Object.InstantiateAsync<T>(T)

Object.InstantiateAsync<T>(T, Transform)

Object.InstantiateAsync<T>(T, Vector3, Quaternion)

Object.InstantiateAsync<T>(T, Transform, Vector3, Quaternion)

Object.InstantiateAsync<T>(T, InstantiateParameters)

Object.InstantiateAsync<T>(T, Vector3, Quaternion, InstantiateParameters)

Object.Instantiate(Object, Scene)

Object.Instantiate<T>(T, InstantiateParameters)

Object.Instantiate<T>(T, Vector3, Quaternion, InstantiateParameters)

Object.FindObjectsByType<T>(FindObjectsSortMode)

Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)

Object.FindFirstObjectByType<T>()

Object.FindAnyObjectByType<T>()

Object.FindFirstObjectByType<T>(FindObjectsInactive)

Object.FindAnyObjectByType<T>(FindObjectsInactive)

Namespace: UnityEngine.UI Assembly: UnityEngine.UI.dll Syntax
[RequireComponent(typeof(Canvas))]
[ExecuteAlways]
[AddComponentMenu("Layout/Canvas Scaler", 101)]
[DisallowMultipleComponent]
public class CanvasScaler : UIBehaviour
Constructors CanvasScaler() Declaration Fields m_DefaultSpriteDPI Declaration
[Tooltip("The pixels per inch to use for sprites that have a 'Pixels Per Unit' setting that matches the 'Reference Pixels Per Unit' setting.")]
[SerializeField]
protected float m_DefaultSpriteDPI
Field Value m_DynamicPixelsPerUnit Declaration
[Tooltip("The amount of pixels per unit to use for dynamically created bitmaps in the UI, such as Text.")]
[SerializeField]
protected float m_DynamicPixelsPerUnit
Field Value m_FallbackScreenDPI Declaration
[Tooltip("The DPI to assume if the screen DPI is not known.")]
[SerializeField]
protected float m_FallbackScreenDPI
Field Value m_MatchWidthOrHeight Declaration
[Tooltip("Determines if the scaling is using the width or height as reference, or a mix in between.")]
[Range(0, 1)]
[SerializeField]
protected float m_MatchWidthOrHeight
Field Value m_PhysicalUnit Declaration
[Tooltip("The physical unit to specify positions and sizes in.")]
[SerializeField]
protected CanvasScaler.Unit m_PhysicalUnit
Field Value m_PresetInfoIsWorld Declaration
[SerializeField]
protected bool m_PresetInfoIsWorld
Field Value m_ReferencePixelsPerUnit Declaration
[Tooltip("If a sprite has this 'Pixels Per Unit' setting, then one pixel in the sprite will cover one unit in the UI.")]
[SerializeField]
protected float m_ReferencePixelsPerUnit
Field Value m_ReferenceResolution Declaration
[Tooltip("The resolution the UI layout is designed for. If the screen resolution is larger, the UI will be scaled up, and if it's smaller, the UI will be scaled down. This is done in accordance with the Screen Match Mode.")]
[SerializeField]
protected Vector2 m_ReferenceResolution
Field Value m_ScaleFactor Declaration
[Tooltip("Scales all UI elements in the Canvas by this factor.")]
[SerializeField]
protected float m_ScaleFactor
Field Value m_ScreenMatchMode Declaration
[Tooltip("A mode used to scale the canvas area if the aspect ratio of the current resolution doesn't fit the reference resolution.")]
[SerializeField]
protected CanvasScaler.ScreenMatchMode m_ScreenMatchMode
Field Value Properties defaultSpriteDPI

The pixels per inch to use for sprites that have a 'Pixels Per Unit' setting that matches the 'Reference Pixels Per Unit' setting.

Declaration
public float defaultSpriteDPI { get; set; }
Property Value dynamicPixelsPerUnit

The amount of pixels per unit to use for dynamically created bitmaps in the UI, such as Text.

Declaration
public float dynamicPixelsPerUnit { get; set; }
Property Value fallbackScreenDPI

The DPI to assume if the screen DPI is not known.

Declaration
public float fallbackScreenDPI { get; set; }
Property Value matchWidthOrHeight

Setting to scale the Canvas to match the width or height of the reference resolution, or a combination.

Declaration
public float matchWidthOrHeight { get; set; }
Property Value physicalUnit

The physical unit to specify positions and sizes in.

Declaration
public CanvasScaler.Unit physicalUnit { get; set; }
Property Value referencePixelsPerUnit

If a sprite has this 'Pixels Per Unit' setting, then one pixel in the sprite will cover one unit in the UI.

Declaration
public float referencePixelsPerUnit { get; set; }
Property Value referenceResolution

The resolution the UI layout is designed for.

Declaration
public Vector2 referenceResolution { get; set; }
Property Value scaleFactor

Scales all UI elements in the Canvas by this factor.

Declaration
public float scaleFactor { get; set; }
Property Value screenMatchMode

A mode used to scale the canvas area if the aspect ratio of the current resolution doesn't fit the reference resolution.

Declaration
public CanvasScaler.ScreenMatchMode screenMatchMode { get; set; }
Property Value uiScaleMode

Determines how UI elements in the Canvas are scaled.

Declaration
public CanvasScaler.ScaleMode uiScaleMode { get; set; }
Property Value Methods Handle()

Method that handles calculations of canvas scaling.

Declaration
protected virtual void Handle()
HandleConstantPhysicalSize()

Handles canvas scaling for a constant physical size.

Declaration
protected virtual void HandleConstantPhysicalSize()
HandleConstantPixelSize()

Handles canvas scaling for a constant pixel size.

Declaration
protected virtual void HandleConstantPixelSize()
HandleScaleWithScreenSize()

Handles canvas scaling that scales with the screen size.

Declaration
protected virtual void HandleScaleWithScreenSize()
HandleWorldCanvas()

Handles canvas scaling for world canvas.

Declaration
protected virtual void HandleWorldCanvas()
OnDisable() Declaration
protected override void OnDisable()
Overrides OnEnable() Declaration
protected override void OnEnable()
Overrides OnValidate() Declaration
protected override void OnValidate()
Overrides SetReferencePixelsPerUnit(float)

Sets the referencePixelsPerUnit on the Canvas.

Declaration
protected void SetReferencePixelsPerUnit(float referencePixelsPerUnit)
Parameters Type Name Description float referencePixelsPerUnit

The new reference pixels per Unity value

SetScaleFactor(float)

Sets the scale factor on the canvas.

Declaration
protected void SetScaleFactor(float scaleFactor)
Parameters Type Name Description float scaleFactor

The scale factor to use.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4