Playmaker Forum
PlayMaker Feedback => Action Requests => Topic started 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!
-
Hi,
yes, it's planned as an addition.
Bye,
Jean
-
Thank you! This way we will be able to play cutscenes with characters spawned during gameplay.
-
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
-
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!
-
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
-
I attached an example scene.
-
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 :)
-
Hi,
I think you forgot the animator file:
(https://i.imgur.com/8dNnt8i.png)
Bye,
Jean
-
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
-
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.
-
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! :)
-
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
-
Hi,
I don't think it's Playmaker related right?
Bye,
Jean
-
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
-
Hi,
Oh I see. I 'll include this, thanks for looking this up!
Bye,
Jean
-
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
-
Excellent!
That's a much better name haha ;) thanks Jean! :D