Это видео недоступно.
Сожалеем об этом.

Unity Playables is Actually a Game-Changer

Поделиться
HTML-код
  • Опубликовано: 17 авг 2024
  • The Playables API holds hidden potential that can transform your game development. In this video, you'll learn how to add runtime animations to your characters that come from objects that provide their own animations, automating complex sequences and creating more dynamic environments with minimal coding. Join us to unlock the secrets of these powerful tools and elevate your game's animation system to the next level!
    Links: docs.unity3d.c...
    docs.unity3d.c...
    Want to support me? 😀
    Buy me a coffee! ko-fi.com/adam...
    🔔 Subscribe for more Unity Tutorials / @git-amend
    Discord: / discord
    #unity3d #gamedev #indiedev
    ▬ Contents of this video ▬▬▬▬▬▬▬▬▬▬
    0:00 Playables API
    1:05 Playable Graph Setup
    5:00 Locomotion Mixer
    6:26 Dynamic Animations
    12:25 Doing More
    Source code: gist.github.co...
    More Useful Code:
    github.com/ada...
    Unity Utility Library: github.com/ada...
    Lock Inspector Hotkey: gist.github.co...
    Assets Shown In This Video (Affiliate Links)
    More Effective Coroutines: assetstore.uni...
    Modular 3D Text: assetstore.uni...
    Gridbox Prototype Materials FREE: assetstore.uni...
    RamsterZ Loot Anims: assetstore.uni...
    Kawaii Animations: assetstore.uni...
    Clazy Runner Action Animations: assetstore.uni...
    Synty Prototype: assetstore.uni...
    Hierarchy Icons: assetstore.uni...
    Better Transform: assetstore.uni...
    Better Mesh Filter: assetstore.uni...
    Kyeoms VFX: assetstore.uni...
    Follow me!
    linktr.ee/gita...

Комментарии • 142

  • @git-amend
    @git-amend  Месяц назад +28

    Happy Sunday! Hope you all like this dive into the Unity Playables API, let me know in the comments if we should do a deeper dive into a more complex use case!

    • @Krechevskoy
      @Krechevskoy Месяц назад +4

      I would love to see a deep dive on this. In particular it would be cool to see how to use this to use for something like a multi part interaction, like climbing a ladder (i.e. Dark souls), or a multi-actor interaction, like a finishing move (i.e. God of War) or a backstab.

    • @yonatanabergel
      @yonatanabergel Месяц назад

      Would love! Unity 6 is very promising so far :)

    • @git-amend
      @git-amend  Месяц назад +2

      All good ideas, I'm taking notes!

    • @ggwp8618
      @ggwp8618 Месяц назад

      Hi. How about covering the topics of Photon Multiplyers?

    • @git-amend
      @git-amend  Месяц назад +1

      @@ggwp8618 I've thought about that, but I'm not sure how well that would go over. But, I have been looking at the new Photon products lately, so it is in the back of my mind.

  • @SunSailor
    @SunSailor Месяц назад +32

    Please continue on this topic, as Timeline is nothing else than a playable graph as well. It is an essential system for Unity and frustrating few coders know about it, not speaking about being proficient in it. We had to cut an awful lot of detail features, because people in my team even didn't understand what I tried to tell them about this system, so your videos would be essential resources, not only for me, but for the whole development scene. Thank you for the already made videos!

    • @git-amend
      @git-amend  Месяц назад +9

      Sounds good, taking notes for a follow up. I’d like to talk about Timeline a bit more as well. Cheers!

  • @ImmortalTimothyM
    @ImmortalTimothyM Месяц назад +14

    Wow, 1 minute into the video and just showing that More Effective Coroutines exists is worth watching this. Thanks.
    I have been looking into using the Playables system for interacting and emotes for a game so this is great timing.

    • @git-amend
      @git-amend  Месяц назад +1

      Glad it was helpful!

  • @AirburstStudios
    @AirburstStudios Месяц назад +25

    Finally a Programming-Centric RUclipsr for Unity. I always thought it's all about people using assets from the store rather than being real developers first

    • @git-amend
      @git-amend  Месяц назад +2

      Thanks! Glad you’re here!

    • @1ulicaaNerd
      @1ulicaaNerd Месяц назад +1

      I heard that he's an ex-worker for unity

  • @Assassin1923
    @Assassin1923 Месяц назад +10

    Hi! Your channel is a real find! I am a unity developer and I find your content very useful. Thank you!

    • @git-amend
      @git-amend  Месяц назад +1

      Happy to hear that! Thank you!!

  • @Fitz0fury
    @Fitz0fury Месяц назад +16

    I had never even heard of this. another great video!

    • @git-amend
      @git-amend  Месяц назад

      Haha, I thought you might like this one! Cheers!

  • @MrOmega-cz9yo
    @MrOmega-cz9yo Месяц назад +4

    Hi! I was unaware of both Playables, and the More Effective Coroutines asset. Thanks for the info!

  • @adek445
    @adek445 Месяц назад +3

    It's so cool! I would love to get into more complicated system that you've mentioned. I wish you will come up with some nice video that moves this to the next level one day.
    Much love!

    • @git-amend
      @git-amend  Месяц назад +1

      Thank you... I think there likely will be a follow up vid to this with something more complex, look for that in a few weeks!

  • @GameDragon2k
    @GameDragon2k Месяц назад +3

    This video came at a great time. As I was just exploring the Playables API.

  • @alif-fgd
    @alif-fgd Месяц назад +3

    Great content as always! I had never heard of this API, looks powerful.
    Just some personal feedback in this particular video, with just your introduction I struggled to find the main objetive of the system or what pain a system like that could alleviate. I needed to see the end of the video to understand better what exactly you were trying to achieve. Might be just me, but anyway, I thought it could be usefull to share

    • @git-amend
      @git-amend  Месяц назад +1

      Thanks for the comment, I'll keep your feedback in mind.

  • @darkenaxe
    @darkenaxe Месяц назад +2

    I didn't know about this API, thank you for this quick and efficient presentation!

  • @tommelling9847
    @tommelling9847 Месяц назад +2

    Amazing stuff! Didn't even know this existed, would have been incredibly useful on out last project.
    Also the way you deliver higher level concepts is amazing, talking through each part without making assumptions and 'skipping' ahead. You have a rare talent for teaching. Keep up the good work.

    • @git-amend
      @git-amend  Месяц назад

      Glad to hear that! Thank you!

  • @friedcrumpets
    @friedcrumpets Месяц назад

    I looked into this a few months ago and found barely any resources on it. It would be absolutely incredible if you could cover this in-depth. Such an incredible tool that doesn't get enough attention.

    • @git-amend
      @git-amend  Месяц назад +1

      So far just one follow up vid, hasn't gotten much attention though. Perhaps down the road we can build something more involved though. It's definitely very useful.

    • @friedcrumpets
      @friedcrumpets Месяц назад

      @@git-amend I'll drop it a watch and I'll keep my eyes for some more Playables content in the future. Keep up the great work 👍
      I noticed you were using IEnumerators in this too. Have you had a look at Awaitables yet? Or UniTask for pre Unity 2023. I've hopped off coroutines since I discovered these.

  • @TrentSterling
    @TrentSterling 15 дней назад +1

    Oh boy, this is a rich repository of resources and crazy useful unity magic instantly. Insta-sub!

  • @derbabonennt8876
    @derbabonennt8876 Месяц назад +3

    Although i knew the playable api this video was very informing.
    Could you make a video about the script-playables - these are the type of playables where I dont know how or for what to use them.

    • @git-amend
      @git-amend  Месяц назад +1

      Yeah, I think we’ll have to have a follow up video to this one with a more advanced use case.

  • @pickgliss2498
    @pickgliss2498 Месяц назад +2

    The unity team must hire you!!! you can make the unity must better!!!!!!

  • @filipadamczuk99
    @filipadamczuk99 Месяц назад +2

    Great video! I would love to see an episode about async vs coroutines in Unity. With the addition of the Awaitable class in the latest Unity versions, it seems that using coroutines is becoming obsolete. Focusing entirely on the async workflow appears to be more efficient. The ability to easily switch between threads with Awaitable is particularly impressive:
    ```csharp
    // Execute something on the main thread
    await Awaitable.BackgroundThreadAsync();
    // Now execute something on the background thread
    await Awaitable.MainThreadAsync();
    // And back to the main thread
    ```
    I think this approach is fantastic!

    • @git-amend
      @git-amend  Месяц назад +1

      Great idea, I’ll add that to the list!

  • @MrTomateSalat
    @MrTomateSalat Месяц назад +4

    I only can recommend Playables to everyone because the Unity animator is really a terrible thing to deal with. The good thing is that it doesn't have to be an either or. In my last project I've created PlayableGraphs on the fly and let them take control over the animator. So for basic locomotion stuff I use Animator (as long as it isn't complex animator is good enough) but for more advanced stuff I go for Playables.

    • @git-amend
      @git-amend  Месяц назад +1

      I like this approach. I would opt for this as well, a combination of both is really the best way to go in most cases.

  • @NongBenz
    @NongBenz Месяц назад +1

    Surprised I haven't heard about the Playables API. Sounds like the smart objects in FEAR where the animations and data are stored in the world objects instead of on the player directly.

    • @git-amend
      @git-amend  Месяц назад

      Hm yeah, they must have done something similar!

  • @Sosa829
    @Sosa829 Месяц назад

    That's so cool, I seriously need a video explaining how to expand this into a full animation system with way more Animations/blend trees and Masks. how to add events at certain frames etc

    • @git-amend
      @git-amend  Месяц назад

      Another great idea for a video, cheers!

  • @ChristopherYabsley
    @ChristopherYabsley Месяц назад

    This is such professional content. Amazing work and thanks for sharing the knowledge.

  • @furkanunlu2177
    @furkanunlu2177 Месяц назад +2

    Each video feels like a lesson. Thanks a lot!

    • @git-amend
      @git-amend  Месяц назад +1

      Glad you like them!

  • @PsychoNMG
    @PsychoNMG Месяц назад +3

    Very cool video! I didn't even know "playables" existed. Certainly something I will be looking into.
    As a "code review", I'm curious if there was a reason you didn't choose to create an enum or a well named constant for the mixer inputs. Is it just because there are only 2 at the time of this video? Probably a bit of a fanatic's /zealot's mindset but I'm triggered when I see magic numbers / strings.

    • @git-amend
      @git-amend  Месяц назад +2

      Thank you! And you are 100% correct, I am also not a fan of the magic numbers and should have changed them - and certainly I would have as soon as the system adds any additional complexity.

    • @midniteoilsoftware
      @midniteoilsoftware Месяц назад

      You beat me to it ;)

  • @littleowlgaming-unity-tutorial
    @littleowlgaming-unity-tutorial Месяц назад +1

    just out of curiosity, you get the better courotines and all, because it allows to run a coroutine in classes that normally can't. what about async functions? that's what I use in like say scriptable objs that cant use coroutines. and you can run a async just like a coroutine and have return types

    • @git-amend
      @git-amend  Месяц назад

      Another viewer made a similar comment. I've added a coroutines vs async/await discussion video to my TODO list.

  • @Shonnyy
    @Shonnyy Месяц назад +2

    Awesome vid! What's the drawing tool you're using to draw the playable graph diagram?

    • @git-amend
      @git-amend  Месяц назад +3

      Thank you! The tool is called Excalidraw, you can use it online or integrate it with Obsidian: ruclips.net/video/o0exK-xFP3k/видео.html

  • @DoctorGester
    @DoctorGester 2 дня назад

    I wish I saw this video earlier. Playable graphs have very poor documentation and I had to first reverse engineer some abandoned japanese project to understand how to do blending correctly. But now all animations in our game are using predictable manually time controlled Playable Graphs with perfect rewind.

    • @DoctorGester
      @DoctorGester 2 дня назад

      Just realized that the video only came out a month ago, while I had to figure out playables myself at the end of last year, not surprising I didn't stumble on it.

    • @git-amend
      @git-amend  2 дня назад

      Rewind seems like a nice use of Playables!

  • @Broudy001
    @Broudy001 Месяц назад +1

    Hot Damn that is wicked, I definitely need more of this.

    • @git-amend
      @git-amend  Месяц назад

      Great, glad to hear that. I think I'll do one or two more on this topic in a little while.

    • @Broudy001
      @Broudy001 Месяц назад

      @@git-amend I love to see / use this to do a combat system where the animations swap in and out based on the weaponry equipped or the position in a combo

    • @git-amend
      @git-amend  Месяц назад

      That's a good idea, I'll jot that down

  • @RafaelAzriaiev-kv9qm
    @RafaelAzriaiev-kv9qm Месяц назад +1

    Very informative video.
    Small question would you use playable like delivering clip when changing equipment to use the animation of that specific weapon or would you use something else?

    • @git-amend
      @git-amend  Месяц назад

      You certainly could do that, and in fact that might be optimal.

  • @yonatanabergel
    @yonatanabergel Месяц назад +1

    This + Interactable system.
    Insane :)

    • @git-amend
      @git-amend  Месяц назад

      Haha that's for sure!

  • @FudgelGames
    @FudgelGames Месяц назад

    Terrific as usual! Your videos always seem to pop up at exactly the right time for me. The only part that left me a little confused is the blend duration calculation. Wouldn't Mathf.Min(clip.Length * 0.1f, clip.Length / 2) always return clip.Length * 0.1f since 10% will always be less than 50%?
    Would it possibly make more sense to calculate the duration as follows?
    Mathf.Clamp(clip.Length * 0.1f, 0.1f, clip.Length * 0.5f)?
    Or am I just really confused 😅?
    /edit - I guess I really am confused! Clamping doesn't make sense here since again, 10% of clip length will never be greater than 50% of clip length 🤦‍♂

    • @git-amend
      @git-amend  Месяц назад +1

      Thanks for your kind words! You’re right about the logic. Mathf.Min(clip.length * 0.1f, clip.length / 2) will indeed always return clip.length * 0.1f because 10% is always less than 50%. Using Mathf.Clamp(clip.length * 0.1f, 0.1f, clip.length * 0.5f) is a better approach as it ensures the blend duration is not less than 0.1f and not more than half the clip length. Great catch!

  • @AryanSingh-cw6ce
    @AryanSingh-cw6ce Месяц назад +1

    Very helpful video , I always learn something new by these ,If its not too much to ask can you tell me how to create a modular quest system , which can have conditions like how to start , connected with overall world variables (like if a very important event happened in game) than quest become unavailable or can no longer be continued, how to handle saving all the quest points of different types of quest, branching in quests.
    Also on side note: how does elden ring handle their quest allocation.

    • @git-amend
      @git-amend  Месяц назад +2

      Thanks for the comment. That's an interesting topic for a video, I'll write that down! I'm not totally sure about Elden Ring (I haven't played it yet - shocking I know - but I'll find out).

  • @raymk
    @raymk Месяц назад

    I've been wanting to make a custom Playable script for custom Timeline tracks, but it's pretty hard to understand.
    I hope one day you will touch on that!

    • @git-amend
      @git-amend  Месяц назад +1

      Next Sunday's video will be about slightly more complex Playables, and while not specific to Timeline it will explain a few of the more complicated things you need for custom Track scripts, such as ExposedReference

  • @martinvanstein.youtube
    @martinvanstein.youtube Месяц назад +1

    Great content gave you some coffee money and hope you'll do a full course ... purely for selfish reasons as I am rewriting my first game (and only game for now, called king of crokinole) to be more performant and it is hard to find actual quality content on more advanced topics.
    Any way keep up the good work !!!

    • @git-amend
      @git-amend  Месяц назад +3

      Hey thank you so much! I appreciate the support and the awesome comment!

  • @bazzboyy976
    @bazzboyy976 Месяц назад

    Awesome video. It's hard for me to see how to see what benefits this solution has over the animator system though. Being able to drive everything explicitly from code is nice though.

    • @git-amend
      @git-amend  Месяц назад

      The main benefit shown in this video is that objects can provide their own animations. You can read about some of the other advantages here: docs.unity3d.com/Manual/Playables.html

  • @hiperfx892
    @hiperfx892 Месяц назад +1

    More devlogs please

    • @git-amend
      @git-amend  Месяц назад

      Lots more videos on the way.

  • @abclef
    @abclef Месяц назад

    I used this API a few years ago, easy yet powerful, and people can build their customized Animator/Timeline on top of that, which is a must-have for some ACT/Rogue-like games. But the PlayableGraph Visualizer package is still in a very early stage and has been dead for years as its contributor has left Unity, making the whole thing unusable for small studios/ individuals.

    • @git-amend
      @git-amend  Месяц назад

      It's unfortunate that the Visualizer was DOA, but to be honest I found it clunky and unnecessary.

  • @damonfedorick
    @damonfedorick Месяц назад +2

    Nice!

    • @git-amend
      @git-amend  Месяц назад +1

      Thank you! Cheers!

  • @soheil4471
    @soheil4471 Месяц назад

    This was a great video
    you've got yourself a new subscriber :)

  • @erikafurudo9960
    @erikafurudo9960 Месяц назад

    Is this a new API? Since which version? I didn't know this API existed; it seems really useful.

    • @git-amend
      @git-amend  Месяц назад

      Playables has been around a long time, but for some reason it's never been promoted much by Unity. For example, Timeline, which is an big part of Unity, is based on Playable Graph.

  • @launemax
    @launemax Месяц назад

    Tiny Bug in your code: in the BlendOut Function, the handle variable should be "blendOutHandle". @10:58

    • @git-amend
      @git-amend  Месяц назад +1

      Good eye! I've updated the gist. Thanks.

  • @castlecodersltd
    @castlecodersltd Месяц назад

    Interesting, thanks for sharing 🙂

    • @git-amend
      @git-amend  Месяц назад

      Thanks for watching!

  • @user-fm9wx4wc8h
    @user-fm9wx4wc8h Месяц назад

    You are the Gem for the Unity Devs!
    can you share any of your game.

    • @git-amend
      @git-amend  Месяц назад +1

      Thank you... and probably one day I'll do a few dev logs, but might not be for a while.

  • @Rigdereine
    @Rigdereine Месяц назад

    I never new about Playables and now it will be my main research target.
    Do you prefer Coroutines over Async? I always prefer the UniTask Library and use them instead of couroutines but its actually just a personal preference and I would like to see a video about when to use what.

    • @git-amend
      @git-amend  Месяц назад

      Sounds good - the Unity docs are a great place to start, and the dig into the forums a bit for more in-depth discussions. I'll probably have another video on this topic as well. As for coroutines vs async, several other commenters today have brought that up so I'll schedule a video for that topic coming soon!

  • @Krechevskoy
    @Krechevskoy Месяц назад +1

    This is awesome 😎

    • @git-amend
      @git-amend  Месяц назад

      Glad you liked that! Cheers!

  • @lucianobisconti9078
    @lucianobisconti9078 Месяц назад

    Excelente video y la manera en la que explicas, se aprende mucho y se aprecia.

  • @garryguan7115
    @garryguan7115 Месяц назад +1

    What setting in Rider are you using for AI code gen?

    • @git-amend
      @git-amend  Месяц назад

      I don't think there is any AI Code suggestions used in this video, but in other videos I typically use GitHub Copilot, though I have the JetBrains AI as well which is better suited for other tasks such as refactoring. (in my opinion)

  • @fleity
    @fleity Месяц назад

    Playables are super mighty but the api is so little documented and not particularly transparent. Have fun blending entire time lines :-/
    (plus playable visualizer should be mentioned here)

    • @git-amend
      @git-amend  Месяц назад

      Personally I find the visualizer clunky, but I suppose it’s better than nothing. Too bad it’s not being developed.

  • @ceeayestro
    @ceeayestro Месяц назад +1

    I might sound stupid but at what point did you assign the animations to the objects. Thats the only part that has me lost.

    • @git-amend
      @git-amend  Месяц назад +1

      On the Interactable object there is a SerializedField for a clip, which I populated off camera.

    • @ceeayestro
      @ceeayestro Месяц назад +1

      @@git-amend Copy. I thought i had missed something. Your videos are a ton of help.

  • @landosilva
    @landosilva Месяц назад

    Hey, awesome content man! Really liking what you are doing here.
    As a follow up, I would love to see a video about Timelines and ExposedReference
    Cheers!

    • @git-amend
      @git-amend  Месяц назад +1

      Great suggestion! I've started taking some notes for a future vid!

  • @horusvengador8829
    @horusvengador8829 25 дней назад

    Cual es la pagina donde hiciste esos diagramas para explicar mejor? 👀

    • @git-amend
      @git-amend  24 дня назад

      Excalidraw: ruclips.net/video/o0exK-xFP3k/видео.html

  • @TheReverseSide21
    @TheReverseSide21 21 день назад

    What was the software used for making those diagrams?

    • @git-amend
      @git-amend  21 день назад

      It's called Excalidraw

  • @z-time3291
    @z-time3291 Месяц назад

    FUEGO BEBE OTRO TUTO

    • @git-amend
      @git-amend  Месяц назад +1

      Thanks for watching!

  • @user-rm2pj9jf8s
    @user-rm2pj9jf8s Месяц назад

    WOW

    • @git-amend
      @git-amend  Месяц назад +1

      Thanks for watching, hope it’s useful to you!

    • @user-rm2pj9jf8s
      @user-rm2pj9jf8s Месяц назад +1

      @@git-amend always useful

  • @ggwp8618
    @ggwp8618 Месяц назад

    Whenever i come to your channel i feel like i dont know shit about unity😅😅😅

    • @git-amend
      @git-amend  Месяц назад

      Always good to fill in the gaps!

  • @martin-schoen
    @martin-schoen Месяц назад

    This is a great video, not only because it is the 69th :)

    • @git-amend
      @git-amend  Месяц назад +1

      I hadn't even noticed that lol

  • @Haddleton
    @Haddleton Месяц назад

    Curious why you’re using coroutines with a custom asset instead of just using the new-ish async await support?
    EDIT: sleep-deprived brain did not see the other similar comments lol, but I’ll leave it here anyway. Async await is awesome, coroutines are so annoying lol. Glad they’re on the way out.

    • @git-amend
      @git-amend  Месяц назад

      Since this weekend is a follow-up, and there were lots of comments about using async instead, I'll show how to quickly adapt this to use Awaitable as an alternative.

  • @nehal_chandra2777
    @nehal_chandra2777 Месяц назад

    W

  • @midniteoilsoftware
    @midniteoilsoftware Месяц назад

    I'm triggered by your use of "magic numbers" for the indexes (e.g. 0 for idle, 1 for walk) - :)

    • @git-amend
      @git-amend  Месяц назад +1

      Yeah, in hindsight I should have taken the time to remedy that. Most certainly if the system were to grow any larger!

  • @reggieisnotadog4841
    @reggieisnotadog4841 Месяц назад

    This just seems like a much worse version of Animancer. I know this is free but it's just making my investment in Animancer feel very worthwhile. Thanks for the detailed video on it!

    • @nicolasgerard2476
      @nicolasgerard2476 Месяц назад +1

      Well animancer uses that API under the hood ;p Would be a shame if you could slap something like animance in a 10 minute video with explainations on top.

  • @FiazItik
    @FiazItik 22 дня назад

    Hi, what is the texture name that you are using in the plane? @git--amend

    • @git-amend
      @git-amend  22 дня назад

      That's a free asset called Gridbox Prototype Materials - link in the description.

    • @FiazItik
      @FiazItik 22 дня назад

      @@git-amend thanks a lot.

  • @RoxGame
    @RoxGame Месяц назад +1

    I've always found the Playables API confusing, but your explanations make everything clear. Thank you! I'm wondering: what's the best approach to sync this system over a network?

    • @git-amend
      @git-amend  Месяц назад +1

      Thanks for the comment... as for syncing over a network, that's a big discussion, but I would do my utmost to only sync the events happening and not the result of those events. And it really also depends on what package you are using - for the most part, Unity can handle syncing things that are done via the Animator, which is the case here (note that we passed the animator in when creating the PlayableGraph - the Animator is doing the animating and can be synced with a NetworkAnimator component for example if you were using Unity's NGO).

    • @RoxGame
      @RoxGame Месяц назад

      ​@@git-amend I believe Mirror and NGO only sync animator parameters, which i believe not available in the Playables system. However, I'll give them a try. Thank you so much!