Class CanvasBackground
A CanvasBackground is a VisualElement used as the background of a Canvas.
Implements
Inherited Members
VisualElement.ExecuteDefaultAction(EventBase)
VisualElement.Focus()
VisualElement.Overlaps(Rect)
VisualElement.ToString()
VisualElement.GetFirstOfType<T>()
VisualElement.GetFirstAncestorOfType<T>()
VisualElement.canGrabFocus
VisualElement.focusController
VisualElement.cacheAsBitmap
CallbackEventHandler.RegisterCallback<TEventType>(EventCallback<TEventType>, TrickleDown)
CallbackEventHandler.RegisterCallback<TEventType, TUserArgsType>(EventCallback<TEventType, TUserArgsType>, TUserArgsType, TrickleDown)
CallbackEventHandler.UnregisterCallback<TEventType>(EventCallback<TEventType>, TrickleDown)
CallbackEventHandler.UnregisterCallback<TEventType, TUserArgsType>(EventCallback<TEventType, TUserArgsType>, TrickleDown)
Namespace: Unity.AppUI.UI
Assembly: Unity.AppUI.dll
Syntax
public class CanvasBackground : BaseVisualElement, IEventHandler, IVisualElementScheduler, IExperimentalFeatures, ITransitionAnimations, ITransform, IResolvedStyle, IContextOverrideElement, IAdditionalDataHolder
Constructors
CanvasBackground()
Instantiates a CanvasBackground element.
Declaration
public CanvasBackground()
Fields
ussClassName
The CanvasBackground main USS class name.
Declaration
public const string ussClassName = "appui-canvas-background"
Field Value
Type | Description |
---|---|
string |
Properties
drawPoints
Either draw points or lines.
Declaration
public bool drawPoints { get; set; }
Property Value
Type | Description |
---|---|
bool |
nextGridScaleFactor
The scale factor to use for the next grid.
Declaration
public float nextGridScaleFactor { get; set; }
Property Value
Type | Description |
---|---|
float |
offset
The offset of the grid.
Declaration
public Vector2 offset { get; set; }
Property Value
Type | Description |
---|---|
Vector2 |
scale
The scale factor to use for the grid.
Declaration
public float scale { get; set; }
Property Value
Type | Description |
---|---|
float |
spacing
The spacing between lines or points.
Declaration
public float spacing { get; set; }
Property Value
Type | Description |
---|---|
float |