Class CanvasBackground
A CanvasBackground is a VisualElement used as the background of a Canvas.
Implements
Inherited Members
VisualElement.Focus()
VisualElement.Overlaps(Rect)
VisualElement.ToString()
VisualElement.TryGetBinding(BindingId, out Binding)
VisualElement.TryGetDataSourceContext(BindingId, out DataSourceContext)
VisualElement.TryGetLastBindingToUIResult(in BindingId, out BindingResult)
VisualElement.TryGetLastBindingToSourceResult(in BindingId, out BindingResult)
VisualElement.GetFirstOfType<T>()
VisualElement.GetFirstAncestorOfType<T>()
VisualElement.canGrabFocus
VisualElement.focusController
VisualElement.cacheAsBitmap
CallbackEventHandler.RegisterCallback<TEventType>(EventCallback<TEventType>, TrickleDown)
CallbackEventHandler.RegisterCallbackOnce<TEventType>(EventCallback<TEventType>, TrickleDown)
CallbackEventHandler.RegisterCallback<TEventType, TUserArgsType>(EventCallback<TEventType, TUserArgsType>, TUserArgsType, TrickleDown)
CallbackEventHandler.RegisterCallbackOnce<TEventType, TUserArgsType>(EventCallback<TEventType, TUserArgsType>, TUserArgsType, TrickleDown)
CallbackEventHandler.RegisterCallback<TEventType>(EventCallback<TEventType>, CallbackOptions)
CallbackEventHandler.RegisterCallback<TEventType, TUserArgsType>(EventCallback<TEventType, TUserArgsType>, TUserArgsType, CallbackOptions)
CallbackEventHandler.UnregisterCallback<TEventType>(EventCallback<TEventType>, TrickleDown)
CallbackEventHandler.UnregisterCallback<TEventType>(EventCallback<TEventType>, CallbackOptions)
CallbackEventHandler.UnregisterCallback<TEventType, TUserArgsType>(EventCallback<TEventType, TUserArgsType>, TrickleDown)
CallbackEventHandler.UnregisterCallback<TEventType, TUserArgsType>(EventCallback<TEventType, TUserArgsType>, CallbackOptions)
CallbackEventHandler.NotifyPropertyChanged(in BindingId)
Namespace: Unity.AppUI.UI
Assembly: Unity.AppUI.dll
Syntax
public class CanvasBackground : BaseVisualElement, IEventHandler, IResolvedStyle, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, 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
[CreateProperty]
public bool drawPoints { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
nextGridScaleFactor
The scale factor to use for the next grid.
Declaration
[CreateProperty]
public float nextGridScaleFactor { get; set; }
Property Value
| Type | Description |
|---|---|
| float |
offset
The offset of the grid.
Declaration
[CreateProperty]
public Vector2 offset { get; set; }
Property Value
| Type | Description |
|---|---|
| Vector2 |
scale
The scale factor to use for the grid.
Declaration
[CreateProperty]
public float scale { get; set; }
Property Value
| Type | Description |
|---|---|
| float |
spacing
The spacing between lines or points.
Declaration
[CreateProperty]
public float spacing { get; set; }
Property Value
| Type | Description |
|---|---|
| float |