Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Enable Raycast Target in Canvas UI

A topic by EmeraldPond created Mar 13, 2022 Views: 162 Replies: 1
Viewing posts 1 to 2

Is there an equivalent Raycast Target setting on Super Text Mesh objects to what you find on the regular Text object used in the Canvas UI?

I'm building a Toggle control and would love to use clicks on the Super Text to also toggle the value.

Developer

The closest thing in STM is in the stage example scene - look for the script named "STMEventInterpreter" and it has a custom event within it that can spawn a "link" prefab overtop of letters. Since its a prefab, it can be modified to be any collider type, and do anything you want when clicked! The default prefab just uses OnMouseDown() to send a debug message, and uses the script "STMSampleLink"


I hope this helps!