Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Article "Wrapper for Invoke"

Discussion in 'General Discussion' started by nubick, Feb 28, 2015.

  1. nubick

    nubick

    Joined:
    Nov 17, 2012
    Posts:
    30
  2. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    The idea is sound, but a couple of years late. Unity has basically done this with the EventSystem introduced in 4.6.
     
    zombiegorilla likes this.
  3. nubick

    nubick

    Joined:
    Nov 17, 2012
    Posts:
    30
    Can't understand how EventSystem can help in this case... Can you give some example?
     
  4. knr_

    knr_

    Joined:
    Nov 17, 2012
    Posts:
    258
    Huh, this is interesting. Never had a reason to delay calling a function or call a function at repeated intervals before but... if I did... anything to make something strongly typed is a plus. Thanks for sharing.

    The other option for repeated function calls at an interval would be a coroutine, I think?
     
  5. nubick

    nubick

    Joined:
    Nov 17, 2012
    Posts:
    30
    Sure! Coroutines is other way to get the same functional. But coroutine and invoke-methods have a bit difference in behavior when you change enable state of game object.