Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Add custom function to Event trigger

Discussion in 'Scripting' started by petizero, Sep 19, 2019.

  1. petizero

    petizero

    Joined:
    Jan 1, 2019
    Posts:
    47
    So here's the story:

    I added an event trigger(pointer enter) to a button and put the custom object in as a text which has a script attached to it, in which i created a function:


    void Enlargetext()
    {
    Debug.Log("Hi");
    }

    pretty barebones right? Anyways i'd like to add this function to the list of functions.
     
  2. palex-nx

    palex-nx

    Joined:
    Jul 23, 2018
    Posts:
    1,748
    I believe it should be public in order to appear in that list, should it?
     
    Schneider21 likes this.
  3. petizero

    petizero

    Joined:
    Jan 1, 2019
    Posts:
    47
    Lmao yeah you were right thanks my guy!