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

Resolved Use same timeline signal with different parameters

Discussion in 'Timeline' started by Ziplock9000, Jul 14, 2023.

  1. Ziplock9000

    Ziplock9000

    Joined:
    Jan 26, 2016
    Posts:
    360
    I've got a decent timeline working for a test opening cutscene that controls the player, camera, fade in, sounds etc, but the problem is with signals.
    I have a speech bubble generator on my player and I want the timeline to call into that function with different strings at different times. I've got this working, but I have to create a completely new signal instance object for each piece of text and each one needs to be wired up.
    This can't be right and I can't see how a custom signal would fix this as it would still need a new signal instance object.
     
  2. Ziplock9000

    Ziplock9000

    Joined:
    Jan 26, 2016
    Posts:
    360
    I found a solution for this too:

    How to make a custom signal receiver with emitter parameter (gametorrahod.com)

    However, there's one caveat that I don't think he mentions.

    The object you want to control not only needs the custom signal receiver on it, but also the default one otherwise it wont bind to the track in the timeline. However, that is just a dummy and can have it's values defaulted.

    Here's an example that sends a string instead of a bool and calls a method on the object instead of a property on the audio

    If anyone knows a workaround for this untidiness?

     
  3. santikun

    santikun

    Joined:
    Mar 10, 2013
    Posts:
    10
    Did you ever find a solution to this? I'm interested in the exact same thing with ints instead of strings
     
  4. Ziplock9000

    Ziplock9000

    Joined:
    Jan 26, 2016
    Posts:
    360
  5. santikun

    santikun

    Joined:
    Mar 10, 2013
    Posts:
    10
    certainly seems to do the trick!

    upload_2023-8-29_18-16-46.png
     
    Ziplock9000 likes this.