MENU

Fun & Interesting

Build a Better Finite State Machine in Unity

git-amend 34,390 2 years ago
Video Not Working? Fix It Now

In this video, we're going to build a flexible and efficient object-oriented state machine in Unity using C#. The days of using an enum state machine are OVER! This tutorial covers everything from defining states, implementing transitions and predicates and moving between animations using code, all with SOLID principles and the State and Strategy programming patterns. Master these concepts, and you'll be well-equipped to design advanced, reusable state machines for your game projects. 🔔 Subscribe for more Unity Tutorials https://youtube.com/@git-amend #unity3d #gamedev #indiedev #statemachine #3dplatformer ▬ Contents of this video ▬▬▬▬▬▬▬▬▬▬ 0:00 Intro 1:00 Overview 2:13 States 3:55 Predicates 5:00 Transitions 5:44 State Machine 10:00 Refactoring 14:40 Demo 15:30 Challenge 20:17 Challenge Demo *Source code:* https://github.com/adammyhre/3D-Platformer.git *Open Source Used In This Video* https://github.com/KyleBanks/scene-ref-attribute.git *Assets Used In This Project* (Affiliate Links) Dungeon Mason Tiny Hero Duo: (FREE): https://assetstore.unity.com/packages/3d/characters/humanoids/rpg-tiny-hero-duo-pbr-polyart-225148?aid=1101lw3sv MeshTint Burrow (FREE): https://assetstore.unity.com/packages/3d/characters/creatures/meshtint-free-burrow-cute-series-184837?aid=1101lw3sv Cartoon Remaster VFX (FREE): https://assetstore.unity.com/packages/vfx/particles/cartoon-fx-remaster-free-109565?aid=1101lw3sv Casual Game SFX (FREE): https://assetstore.unity.com/packages/audio/sound-fx/free-casual-game-sfx-pack-54116?aid=1101lw3sv Ultimate Low Poly Pack: https://assetstore.unity.com/packages/3d/props/low-poly-ultimate-pack-54733?aid=1101lw3sv DOTween (FREE): https://assetstore.unity.com/packages/tools/animation/dotween-hotween-v2-27676 DOTween (Pro): https://assetstore.unity.com/packages/tools/visual-scripting/dotween-pro-32416?aid=1101lw3sv *Follow me!* https://linktr.ee/gitamend

Comment