Author Topic: UI Camera events vs UI Event Trigger  (Read 1555 times)


  • Jr. Member
  • **
  • Thank You
  • -Given: 11
  • -Receive: 0
  • Posts: 81
    • View Profile
    • Casual Arena
UI Camera events vs UI Event Trigger
« on: September 11, 2014, 04:22:28 AM »
I have been using UI Event Trigger to handle events on my sprites, but I am starting to guess I'm doing it wrong.
Why should I use UI Event Trigger (or even UI Button) if UI Camera is sending events and can get them on my scritps?
Game developer on Casual Arena.


  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UI Camera events vs UI Event Trigger
« Reply #1 on: September 12, 2014, 03:46:54 AM »
UIEventTrigger can be used to trigger a remote function once an event you want arrives. It's the same thing as writing a script with the event function inside of it, such as OnClick, and doing the logic inside. Event trigger lets you have a cleaner approach where you don't need to write custom components for every button, but simply choose a function to call instead.

If you already have a custom script attached, don't use UIEventTrigger. If you want to trigger a function on a different game object, use UIEventTrigger.