Documentation

Page contents

Updated

Generate PDF from page.

Canvas Toggle Extension Behavior

Files: CGFCanvasToggleExtensionBehavior.cs

Path: "CGF/Systems/UI"

Description

Behavior that allows the associated gameobject to rename a toogle based on its current state.

Reference

  • Is Off Text – Text displayed when the toggle is off.
  • Is On Text – Text displayed when the toggle is on.
  • My Text – Reference to the text component associated with the toggle.
  • My Toggle – Reference to the toggle component.

Use

Add this component to the GameObject that should own the behavior.
Configure the inspector fields listed in Reference and assign the required scene or asset references before entering Play Mode.