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

Поделиться
HTML-код
  • Опубликовано: 11 янв 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 👍

  • @DorisRomano-e5b
    @DorisRomano-e5b 2 месяца назад +4

    This tutorial really boosted my knowledge!

  • @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!

  • @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?

  • @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  Месяц назад

      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 .

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

    Oho... Im gonna check this out

  • @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.

  • @whitedeath5057
    @whitedeath5057 14 дней назад +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 14 дней назад

      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 👍

  • @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 ruclips.net/video/VWxgTeCtDAs/видео.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 🙂

  • @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

  • @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.

  • @정동우-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.

  • @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 🙂

  • @nibiruimagineering
    @nibiruimagineering 2 месяца назад +1

    Oh cats! I gotta looking to this

  • @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. 👍

  • @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.

  • @forcesoftheevil9252
    @forcesoftheevil9252 2 месяца назад

    UniTech developed it especially for me, btw 😂

  • @GHO166
    @GHO166 2 месяца назад

    thank you

  • @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 🙂

  • @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

  • @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

  • @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 🙂

  • @dertobbe1176
    @dertobbe1176 2 месяца назад

    More graphs 😩

  • @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 🙂

  • @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

  • @MAGNETO-i1i
    @MAGNETO-i1i 2 месяца назад +1

    "EASY"