Reference API Roblox

Engine API

Website

Related

Reference API Roblox

CanvasGroup

Blends descendants as a group with color/transparency.

Member index 3

HistoryMember
726GroupColor3: Color3
726GroupTransparency: float
inherited from GuiObject
726Active: bool
726AnchorPoint: Vector2
726AutomaticSize: AutomaticSize
726BackgroundColor3: Color3
726BackgroundTransparency: float
726BorderColor3: Color3
726BorderMode: BorderMode
726BorderSizePixel: int
726ClipsDescendants: bool
726Draggable: bool
726GuiState: GuiState
726InputSink: InputSink
726Interactable: bool
726LayoutOrder: int
726NextSelectionDown: GuiObject
726NextSelectionLeft: GuiObject
726NextSelectionRight: GuiObject
726NextSelectionUp: GuiObject
726Position: UDim2
726Rotation: float
726Selectable: bool
726SelectionImageObject: GuiObject
726SelectionOrder: int
726Size: UDim2
726SizeConstraint: SizeConstraint
726Visible: bool
726ZIndex: int
462TweenPosition(endPosition: UDim2, easingDirection: EasingDirection = Out, easingStyle: EasingStyle = Quad, time: float = 1, override: bool = false, callback: Function = nil): bool
713TweenPositionInternal(endPosition: UDim2, easingDirection: EasingDirection = Out, easingStyle: EasingStyle = Quad, time: float = 1, override: bool = false, callback: Function = nil): bool
462TweenSize(endSize: UDim2, easingDirection: EasingDirection = Out, easingStyle: EasingStyle = Quad, time: float = 1, override: bool = false, callback: Function = nil): bool
462TweenSizeAndPosition(endSize: UDim2, endPosition: UDim2, easingDirection: EasingDirection = Out, easingStyle: EasingStyle = Quad, time: float = 1, override: bool = false, callback: Function = nil): bool
713TweenSizeAndPositionInternal(endSize: UDim2, endPosition: UDim2, easingDirection: EasingDirection = Out, easingStyle: EasingStyle = Quad, time: float = 1, override: bool = false, callback: Function = nil): bool
713TweenSizeInternal(endSize: UDim2, easingDirection: EasingDirection = Out, easingStyle: EasingStyle = Quad, time: float = 1, override: bool = false, callback: Function = nil): bool
462DragBegin(initialPosition: UDim2)
462DragStopped(x: int, y: int)
483InputBegan(input: InputObject)
483InputChanged(input: InputObject)
483InputEnded(input: InputObject)
462MouseEnter(x: int, y: int)
462MouseLeave(x: int, y: int)
462MouseMoved(x: int, y: int)
462MouseWheelBackward(x: int, y: int)
462MouseWheelForward(x: int, y: int)
462SelectionGained()
462SelectionLost()
462TouchLongPress(touchPositions: Array, state: UserInputState)
462TouchPan(touchPositions: Array, totalTranslation: Vector2, velocity: Vector2, state: UserInputState)
462TouchPinch(touchPositions: Array, scale: float, velocity: float, state: UserInputState)
462TouchRotate(touchPositions: Array, rotation: float, velocity: float, state: UserInputState)
462TouchSwipe(swipeDirection: SwipeDirection, numberOfTouches: int)
462TouchTap(touchPositions: Array)
inherited from GuiBase2d
726AbsolutePosition: Vector2
726AbsoluteRotation: float
726AbsoluteSize: Vector2
726AutoLocalize: bool
726RootLocalizationTable: LocalizationTable
726SelectionBehaviorDown: SelectionBehavior
726SelectionBehaviorLeft: SelectionBehavior
726SelectionBehaviorRight: SelectionBehavior
726SelectionBehaviorUp: SelectionBehavior
726SelectionGroup: bool
525SelectionChanged(amISelected: bool, previousSelection: GuiObject, newSelection: GuiObject)
inherited from Instance
726Archivable: bool
726Capabilities: SecurityCapabilities
726IsInSandbox: bool
726Name: string
726Parent: Instance
726PredictionMode: PredictionMode
726Sandboxed: bool
726UniqueId: UniqueId
576AddTag(tag: string): null
573ClearAllChildren(): null
462Clone(): Instance
573Destroy(): null
486FindFirstAncestor(name: string): Instance
486FindFirstAncestorOfClass(className: string): Instance
486FindFirstAncestorWhichIsA(className: string): Instance
486FindFirstChild(name: string, recursive: bool = false): Instance
486FindFirstChildOfClass(className: string): Instance
486FindFirstChildWhichIsA(className: string, recursive: bool = false): Instance
486FindFirstDescendant(name: string): Instance
563GetActor(): Actor
486GetAttribute(attribute: string): Variant
462GetAttributeChangedSignal(attribute: string): RBXScriptSignal
631GetAttributes(): Dictionary
648GetChildren(): Instances
462GetDebugId(scopeLength: int = 4): string
707GetDescendants(): Instances
486GetFullName(): string
706GetStyled(name: string, selector: string?): Variant
657GetStyledPropertyChangedSignal(property: string): RBXScriptSignal
576GetTags(): Array
576HasTag(tag: string): bool
486IsAncestorOf(descendant: Instance): bool
486IsDescendantOf(ancestor: Instance): bool
664IsPropertyModified(property: string): bool
698QueryDescendants(selector: string): Instances
573Remove(): null
576RemoveTag(tag: string): null
664ResetPropertyToDefault(property: string): null
573SetAttribute(attribute: string, value: Variant): null
462WaitForChild(childName: string, timeOut: double): Instance
726children(): Instances
726clone(): Instance
726destroy(): null
726findFirstChild(name: string, recursive: bool = false): Instance
726getChildren(): Instances
726isDescendantOf(ancestor: Instance): bool
726remove(): null
462AncestryChanged(child: Instance, parent: Instance)
462AttributeChanged(attribute: string)
462ChildAdded(child: Instance)
462ChildRemoved(child: Instance)
462DescendantAdded(descendant: Instance)
462DescendantRemoving(descendant: Instance)
500Destroying()
657StyledPropertiesChanged()
726childAdded(child: Instance)
inherited from Object
726ClassName: string
726className: string
647GetPropertyChangedSignal(property: string): RBXScriptSignal
647IsA(className: string): bool
726isA(className: string): bool
647Changed(property: string)

Removed member index 2

HistoryMember
528GroupColor: Color3
505Transparency: float

Description

CanvasGroup renders descendants as a group with color and transparency applied to the render result. UIComponent visual modifiers such as UICorner and UIGradient under a CanvasGroup will also apply to the whole group. Note that CanvasGroup always has ClipsDescendants set to true and all descendants will render within group's viewport.

Important Notes

  • Descendants of CanvasGroup will be rendered as a flattened texture only when the ancestor LayerCollector has its ZIndexBehavior set to ZIndexBehavior.Sibling.
  • CanvasGroup consumes extra texture memory. The quality of the texture and total memory usage is limited by the QualityLevel of the client. When exceeding the memory cap, CanvasGroup will render as a blank texture.
  • It's recommended to use CanvasGroup with static sizes, otherwise a new texture would need to be created to accommodate new sizes.

History 18

Members 3

GroupColor3

TypeDefault
Color3

Color tint that applies to all descendants.

History 3

GroupTransparency

TypeDefault
float

Transparency that applies to all descendants.

History 3

Removed members 2

GroupColor

TypeDefault
Color3

History 2

Transparency

TypeDefault
float

History 2

Settings