Skip to content

Latest commit

 

History

History
31 lines (26 loc) · 1.42 KB

TsComponentBindUGUIEvents.md

File metadata and controls

31 lines (26 loc) · 1.42 KB

The current page is translated by a machine, information may be missing or inaccurate. If you encounter any problems or have questions, please submit an ISSUE.

Supported Parameter Types

  • string
  • number
  • boolean
  • bigint
  • UnityEngine.Vector2
  • UnityEngine.Vector3
  • UnityEngine.Color
  • UnityEngine.Color32
  • UnityEngine.Object and its subtypes

Usage Instructions

Using UnityEngine.UI.Button as an example:

  1. Convert to a Wrapper component
    image
  2. Add a Wrapper event
    image
  3. Start the Services service, then select a method on the TsComponent component
    image

Demonstration

Example Scene: projects/Assets/Samples/06_UGUIEvents
Example TypeScript Code: projects/TsProject/src/samples/06_UGUIEvents.ts

  • Event Binding
    image
  • Triggering events in sequence prints the following
    image