EASY way to add AI in Unity 6 - Behavior Package Tutorial

แชร์
ฝัง
  • เผยแพร่เมื่อ 23 ม.ค. 2025

ความคิดเห็น • 63

  • @SunnyValleyStudio
    @SunnyValleyStudio  2 หลายเดือนก่อน +5

    You can find example Demo project for this package at assetstore.unity.com/packages/templates/tutorials/behavior-demo-for-unity-298313 👍

  • @Icewind007
    @Icewind007 2 หลายเดือนก่อน +7

    Ok, just tried this, and I already really like it! I was even half way into creating my own AI system and was getting overwhelmed, and I recreated it in this so much more cleanly.

    • @SunnyValleyStudio
      @SunnyValleyStudio  2 หลายเดือนก่อน

      Yeah I get the same impression. This system really helps me to focus on the ai logic instead of creating an AI framework to run the logic 👍

  • @SimpleTutorials137
    @SimpleTutorials137 หลายเดือนก่อน

    Great video! I just updated my project to Unity 6 and this is going to be a big help! I appreciate you making a video about this, it really helped me learn the basics to get started using it (It's the best tutorial out there so far) I looked in the Unity documentation and it's a little hard to use for this new stuff. Thanks for the video!

    • @SunnyValleyStudio
      @SunnyValleyStudio  หลายเดือนก่อน +1

      Thanks for the comment! I am just preparing a Step-by-Step tutorial about creating a graph for a 3d character using NavMesh. Should be out next week (probably will be a series of 2-3 videos to keep each one short and to the point) 🙂

    • @SimpleTutorials137
      @SimpleTutorials137 หลายเดือนก่อน

      @@SunnyValleyStudio Keep up the good videos! thank you again!

  • @DorisRomano-e5b
    @DorisRomano-e5b 2 หลายเดือนก่อน +4

    This tutorial really boosted my knowledge!

  • @LunarKingYT
    @LunarKingYT 2 หลายเดือนก่อน +1

    Quick question. What's the best way to go about doing this in a 2D platformer? Where the rotation basically doesn't exist. I tried implementing the patrol but it rotates the sprite on the Y axis, causing it to fall through the floor.

    • @SunnyValleyStudio
      @SunnyValleyStudio  2 หลายเดือนก่อน

      What sucks about those systems is that for 2D games you need to code your own logic for those actions. They seems to prioritize 3D projects with NavMeshSystem and this .

  • @purnabratakar7176
    @purnabratakar7176 2 หลายเดือนก่อน +3

    Could you make more in-depth tutorial on this package for Conditionals, Aborts and the FSM switch implementation? This package is very similar to BD and I would like to learn more, but reading through docs is really not my thing. Great Video.

    • @SunnyValleyStudio
      @SunnyValleyStudio  2 หลายเดือนก่อน

      I will definitely have a longer series about AI in a 2D game later this month 👍I might tackle a 3d project afterwards.

  • @fkjaha
    @fkjaha 2 หลายเดือนก่อน +3

    Since you have spent more time with the asset, doesn't it have any downsides or problems? (comparing to writing custom state machines)

    • @SunnyValleyStudio
      @SunnyValleyStudio  2 หลายเดือนก่อน +3

      Well I had some trouble getting used to it. Probably should have created "Condition" instead of "Action" for TargetDetector check. I have created a few FSM implementations in the code myself and used Behavior Designer asset. I don't like relying on other assets so I preferred scripting my ai. Now with this package being officially supported I think that I would chose to spend time learning it and using as my primary way to create ai. Does this help?

  • @firereport1
    @firereport1 หลายเดือนก่อน

    But it does not support ecs/dots technology yet, which is a pity. I don't know when there will be a supported version.

    • @SunnyValleyStudio
      @SunnyValleyStudio  หลายเดือนก่อน +1

      It's a pretty new package and things at unity moves.. slowly (well like in any bug company). Anyhow I will try to ask around 🙂 Feel free to join my discord and ask there so that i don't forget to answer you 👍
      Edit: Unfortunately they are not working on the ECS implementation right now

  • @whitedeath5057
    @whitedeath5057 27 วันที่ผ่านมา +1

    Is it better to code my own state machine or is it better to use this, i currently am going to start a massive project that makes this seem like a lot of research and startup work for me to do before jumping into developement

    • @brokenbytes
      @brokenbytes 26 วันที่ผ่านมา

      This is def better. It might incur minor performance degradation, but the workflow is just so much faster. Especially since you can reuse actions and events to compose new AI types way faster

  • @palanolho82
    @palanolho82 2 หลายเดือนก่อน +1

    Do you know if this works with other navigation systems like A* Pathfinding asset ?

    • @SunnyValleyStudio
      @SunnyValleyStudio  2 หลายเดือนก่อน

      I doubt that there is a premade integration. You can definitely create your own nodes and integrate both systems 👍

  • @CleosetricVlyers
    @CleosetricVlyers 2 หลายเดือนก่อน +1

    Oho... Im gonna check this out

    • @SunnyValleyStudio
      @SunnyValleyStudio  2 หลายเดือนก่อน

      Definitely worth the effort 🙂

  • @ApollousasBear
    @ApollousasBear 2 หลายเดือนก่อน +1

    What sprites are you using at the start of the video? I am sure I have seen them somewhere before but I can't quite find them.

  • @cartaselficas
    @cartaselficas หลายเดือนก่อน +1

    Any chance navmesh will be avaliable to 2D with this behavior update?

    • @SimpleTutorials137
      @SimpleTutorials137 หลายเดือนก่อน +2

      I realised it's very strange using the regular movement nodes... I just created a new node with a movement script and called it using that. It's fairly simple when you get to understand it, I've been using it for a few days and from what I found it's hard to find a lot of info on this subject. I might do a video about it. If you need help with a specific thing about this you can just post the comment here and I'll try to solve it. Happy Coding :)

    • @SunnyValleyStudio
      @SunnyValleyStudio  หลายเดือนก่อน

      I doubt it. Its really up to you to create custom nodes and make it work

    • @SunnyValleyStudio
      @SunnyValleyStudio  หลายเดือนก่อน +2

      Definitely a good idea! So far I have produces a tutorial for 3D Enemy AI th-cam.com/video/VWxgTeCtDAs/w-d-xo.html Probably it would be good to share one for 2D as well

  • @ECAKJ
    @ECAKJ 2 หลายเดือนก่อน +1

    Do you have a video on 2D ai. I’m kind of new and thought navmesh was 3D

    • @SunnyValleyStudio
      @SunnyValleyStudio  2 หลายเดือนก่อน +1

      Yeah navmesh is 3d. I will have work on a more step-by-step tutorial just after Crazy Games game jam ends at the end of this week 🙂

  • @NguyễnTrung-s9c
    @NguyễnTrung-s9c 2 หลายเดือนก่อน

    Hi Bro. How about performance of this package? Can you test with larger object at runtime plz. Thanks

    • @SunnyValleyStudio
      @SunnyValleyStudio  2 หลายเดือนก่อน +2

      Yeah I am going to try creating a larger project and do a step-by-step series about it. I will research performance as well 🙂

  • @정동우-n2x
    @정동우-n2x 2 หลายเดือนก่อน +2

    Cool!

    • @SunnyValleyStudio
      @SunnyValleyStudio  2 หลายเดือนก่อน

      Thanks for the comment 🙂

    • @정동우-n2x
      @정동우-n2x 2 หลายเดือนก่อน

      @@SunnyValleyStudio I've bought all your courses, and I'm thinking that this AI course will also come out. I'm waiting.

  • @GHO166
    @GHO166 2 หลายเดือนก่อน

    thank you

  • @lee1davis1
    @lee1davis1 2 หลายเดือนก่อน +1

    Did you research how to use this new feature or did unity set it all up like a package.?

    • @SunnyValleyStudio
      @SunnyValleyStudio  2 หลายเดือนก่อน +1

      Its a package. That being said creating those branches requires some research. The solution that I show here is probably not the most optimal because I am still learning how to use this package myself. Unity has just released an example project that I have linked din the top comment. Does this answers your question?

    • @lee1davis1
      @lee1davis1 2 หลายเดือนก่อน

      @SunnyValleyStudio yes. I was wondering what the prerequisites for behavior trees was. I know a little.

  • @nibiruimagineering
    @nibiruimagineering 2 หลายเดือนก่อน +1

    Oh cats! I gotta looking to this

    • @SunnyValleyStudio
      @SunnyValleyStudio  2 หลายเดือนก่อน +1

      Thanks for checking out my video 🙂

  • @reqi589
    @reqi589 2 หลายเดือนก่อน

    Thanks for the tutorial, is it also working with a 2d platformer and if yes could you do a tutorial?

    • @SunnyValleyStudio
      @SunnyValleyStudio  2 หลายเดือนก่อน +2

      It works with all types of projects. You just need to specify the logic 🙂
      I am preparing a step-by-step tutorial about it. I just need to work a bit more with this asset. 👍

  • @forcesoftheevil9252
    @forcesoftheevil9252 2 หลายเดือนก่อน

    UniTech developed it especially for me, btw 😂

  • @thomasshaw4855
    @thomasshaw4855 2 หลายเดือนก่อน

    The million dollar question...can you update the graph while in playmode and have the behaviours update in realtime (without having to jump in and out of playmode).

    • @SunnyValleyStudio
      @SunnyValleyStudio  2 หลายเดือนก่อน

      Hey! I don't think you can. I am pretty sure that you can swap graphs at runtime so you could potentially create duplicate graph and change something there - but I am not sure it you can and if at this point it isn't easier to just stop and start the project again.

  • @ignacioviera-b7u
    @ignacioviera-b7u หลายเดือนก่อน

    So, is Behavior recommended for making 2D games?

    • @SunnyValleyStudio
      @SunnyValleyStudio  หลายเดือนก่อน +2

      Hey! Its a pretty new package but seem quite robust. In 2D we need to write a bit more code are the premade Actions are mostly for 3D. Performance is something that isn't yet well described so if you expect to have a large project with a lot of AI it might be something to check first. Still its a unity package so I expect them to improve it over time 🙂

  • @darkwavepaint
    @darkwavepaint 2 หลายเดือนก่อน +2

    I wear glasses specifically for the colors of Visual Scripting. :)

    • @SunnyValleyStudio
      @SunnyValleyStudio  2 หลายเดือนก่อน

      IMO it's great that there is some color and design to this tool 🙂

  • @Baaatz07
    @Baaatz07 2 หลายเดือนก่อน

    Finally 🗿

    • @SunnyValleyStudio
      @SunnyValleyStudio  2 หลายเดือนก่อน +1

      Yeah I am too super excited about finally having a native solution for AI in unity.

    • @Baaatz07
      @Baaatz07 2 หลายเดือนก่อน

      Could you maybe make a tutorial on how to use this feature in 3d? Or is it the same process

  • @Muneebdevelopment361
    @Muneebdevelopment361 หลายเดือนก่อน

    hey is it fully free bheavior?

    • @SunnyValleyStudio
      @SunnyValleyStudio  หลายเดือนก่อน

      Yeah its a unity package docs.unity3d.com/Packages/com.unity.behavior@1.0/manual/behavior-graph.html

  • @dertobbe1176
    @dertobbe1176 2 หลายเดือนก่อน

    More graphs 😩

    • @SunnyValleyStudio
      @SunnyValleyStudio  2 หลายเดือนก่อน +1

      Yeah but I think its a good thing 👍

  • @TusharDharashivkar-p3e
    @TusharDharashivkar-p3e 2 หลายเดือนก่อน

    What's the AI in it? It seems more like visual scripting..

    • @SunnyValleyStudio
      @SunnyValleyStudio  2 หลายเดือนก่อน +2

      I supposed you can say that. I have implemented FSM, Context Steering and Behavior Tree through scripts and I would definitely preferer using this package instead to give some behaviors to my NPCs

    • @matt46O
      @matt46O 2 หลายเดือนก่อน +2

      it's AI as in Video game AI
      if you want AI like chatgpt for unity there's muse

  • @sasdasu00dfsdfardo
    @sasdasu00dfsdfardo 2 หลายเดือนก่อน

    big if true

    • @SunnyValleyStudio
      @SunnyValleyStudio  2 หลายเดือนก่อน

      I think its worth to give it a shot. Free is a fair price after all 🙂

  • @MAGNETO-i1i
    @MAGNETO-i1i 2 หลายเดือนก่อน +1

    "EASY"