Playmaker Forum

PlayMaker Feedback => Action Requests => Topic started by: Kubold on October 09, 2017, 08:51:05 AM

Title: Timeline - Set Generic Binding[SOLVED]
Post by: Kubold on October 09, 2017, 08:51:05 AM
Can we have a PlayableDirector.SetGenericBinding Action?

I want to be able to assign a GameObject to a Timeline track in runtime.

As in the Unity Staff member answers in this post: https://forum.unity.com/threads/set-playabledirector-bindings-from-script.487337/

Thanks!
Title: Re: Timeline - Set Generic Binding
Post by: jeanfabre on October 10, 2017, 02:27:19 AM
Hi,

 yes, it's planned as an addition.

 Bye,

 Jean
Title: Re: Timeline - Set Generic Binding
Post by: Kubold on October 10, 2017, 05:36:06 AM
Thank you! This way we will be able to play cutscenes with characters spawned during gameplay.
Title: Re: Timeline - Set Generic Binding
Post by: jeanfabre on October 27, 2017, 03:43:10 AM
Hi,

 ok, first take on an action to set genericBinding. You can get it on the Ecosystem or here (https://github.com/PlayMakerEcosystem/PlayMakerCustomActions_U2017/blob/master/Assets/PlayMaker%20Custom%20Actions/Timeline/SetPlayableDirectorGenericBinding.cs)

I think I'll need more features like the ability to select which track, by index or name. But let me know if this one works for you.

Bye,

 Jean

Title: Re: Timeline - Set Generic Binding
Post by: Kubold on October 27, 2017, 03:25:24 PM
Thank you! Totally works. It assigns the object to the first track of the Timeline, so it is usable for me in most cases.

The ability to select tracks would be awesome. With that, I could make cinematic cutscenes with multiple characters, that are spawned during gameplay.

Thanks again!
Title: Re: Timeline - Set Generic Binding
Post by: jeanfabre on October 29, 2017, 02:09:16 PM
Hi,

 yes, but I am not sure what the name of the tracks come from, if you can ship me a package with a multi track channel with different names, I'll see how I can make it work, I can also do it with indexes in all cases.

 bye,

 Jean
Title: Re: Timeline - Set Generic Binding
Post by: Kubold on October 30, 2017, 04:08:08 AM
I attached an example scene.
Title: Re: Timeline - Set Generic Binding
Post by: Kubold on November 09, 2017, 05:51:04 AM
It's perfectly fine if the Action will allow you to choose only by index. I'm not sure if choosing by track name is necessary. But if it is possible and easy to do then sure :)
Title: Re: Timeline - Set Generic Binding
Post by: jeanfabre on November 10, 2017, 02:50:19 AM
Hi,

 I think you forgot the animator file:

(https://i.imgur.com/8dNnt8i.png)

Bye,

 Jean
Title: Re: Timeline - Set Generic Binding
Post by: jeanfabre on November 10, 2017, 03:34:19 AM
Hi,

 please update the action for setting generic binding, you';ll have the option to set binding for a track index or track name( Stream Name)
 
Let me know :)

if that's ok, I'll wrap this up and create a package with the timeline proxy as well.

 Bye,

 Jean
Title: Re: Timeline - Set Generic Binding
Post by: Kubold on November 10, 2017, 10:11:27 AM
Hi,

 I think you forgot the animator file:

(https://i.imgur.com/8dNnt8i.png)

Bye,

 Jean



No, no, that is the whole point of this Action. This empty slot is where you should assign a GameObject with Animator component using your Action :) It is empty by design. Anything that will be assigned to this track, should play the animation on this track.
Title: Re: Timeline - Set Generic Binding
Post by: Kubold on November 10, 2017, 10:12:02 AM
Hi,

 please update the action for setting generic binding, you';ll have the option to set binding for a track index or track name( Stream Name)
 
Let me know :)

if that's ok, I'll wrap this up and create a package with the timeline proxy as well.

 Bye,

 Jean

Thank you! That's awesome! :)
Title: Re: Timeline - Set Generic Binding[SOLVED]
Post by: craigz on May 05, 2018, 10:55:45 PM
Question on this! Specifically in regards to assigning the Cinemachine Brain for a Cinemachine track.

Since I spawn my in game camera at runtime, I have to assign the Cinemachine Track generic binding also at runtime. But when I use this action, assigning the main camera doesn't contextually have it grab the Cinemachine Brain component, it just assigns the camera as a game object :\

EDIT: Not sure if it matters, but at runtime, manually dragging/dropping the main camera into the slot works because it grabs that component.

What I need to set: (using my dummy camera object for scene staging)
(https://i.imgur.com/hqoJglo.png)

What setting it currently does:
(https://i.imgur.com/J3FIPgC.png)

Any pointers on this? :D

-craigz
Title: Re: Timeline - Set Generic Binding[SOLVED]
Post by: jeanfabre on May 07, 2018, 02:23:46 AM
Hi,

 I don't think it's Playmaker related right?

 Bye,

 Jean
Title: Re: Timeline - Set Generic Binding[SOLVED]
Post by: craigz on May 07, 2018, 04:18:49 PM
Ehhh... not quite sure :) deals with the actions input variable so maybe?

I just duplicated and modified a new version of the action to take an object variable instead, since it might be a fringe case.

Attached incase anyone else needs it, useful for runtime timeline camera assignments!

-craigz
Title: Re: Timeline - Set Generic Binding[SOLVED]
Post by: jeanfabre on May 09, 2018, 03:48:39 AM
Hi,

Oh I see. I 'll include this, thanks for looking this up!

 Bye,

 Jean
Title: Re: Timeline - Set Generic Binding[SOLVED]
Post by: jeanfabre on May 11, 2018, 02:53:01 AM
Hi,

 ok, it's up on the ecosystem, I named it SetPlayableDirectorGenericObjectBinding

 thanks for your contribution, it helps that you could point me to the right mods to do!

Bye,

 Jean
Title: Re: Timeline - Set Generic Binding[SOLVED]
Post by: craigz on May 14, 2018, 05:57:47 PM
Excellent!

That's a much better name haha ;) thanks Jean! :D