Table of Contents

Class Canvas

Namespace
UILib
Assembly
UILib.dll

A Canvas which each Overlay gets attached to.

Every overlay has its own canvas to handle sorting them on top of each other.

public class Canvas : UIObject
Inheritance
Canvas
Inherited Members

Properties

canvas

The underlying Unity Canvas.

public Canvas canvas { get; }

Property Value

Canvas

raycaster

The GraphicRaycaster attached to this canvas.

public GraphicRaycaster raycaster { get; }

Property Value

GraphicRaycaster

scaler

The CanvasScaler attached to this canvas.

public CanvasScaler scaler { get; }

Property Value

CanvasScaler

Methods

SetThisTheme(Theme)

Allows setting the theme of this canvas. Does nothing.

This handles setting the theme specifically for this object, not its children. It's protected to allow overriding if you were to create a subclass.

In most cases, you'd probably want to use SetTheme(Theme) instead.

protected override void SetThisTheme(Theme theme)

Parameters

theme Theme

The theme to apply