Jobs System Line of Sight Checking | AI Series Part 40 | Unity Tutorial

Поделиться
HTML-код
  • Опубликовано: 19 дек 2024

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

  • @brickch4pel
    @brickch4pel 6 месяцев назад +1

    The funny thing is, I've been trying to learn how to use the Jobs system via implementing it into the LOS system I had and failed miserably because I didn't know the caveats of needing unmanaged resources lmao ---- Then this video popped up!

  • @Dehakuzo
    @Dehakuzo 2 года назад +3

    I've been getting into the Jobs system lately and it's wonderful, I had no idea that it had ray/spherecast compatibility. Thanks for the vid!

    • @LlamAcademy
      @LlamAcademy  2 года назад +1

      Awesome 😎 glad it could help!

  • @lianemedina280
    @lianemedina280 2 года назад +1

    Oh super😍 Good afternnon , Have a nice day ahead

  • @sealsharp
    @sealsharp 11 месяцев назад +1

    Nice work explaining this!

  • @adamodimattia
    @adamodimattia 10 месяцев назад +1

    Great content! I didn't even know that there is a device for multithreaded sphere casting like sphere cast command!

  • @bezoro-personal
    @bezoro-personal Год назад +3

    You could create all the SpherecastCommands inside a IJobParallelFor rather than on the main thread and that should improve performance even further.

    • @LlamAcademy
      @LlamAcademy  Год назад

      Great idea! I remember I was struggling to use that in my game for some reason I don’t remember now, but for this use case, absolutely applicable!

  • @LimitedInput
    @LimitedInput 2 года назад +1

    This is a great video. Taking common expensive gameplay actions and job'iying them

  • @MarekNijaki
    @MarekNijaki 2 года назад +5

    Great job, there is not a lot videos about threads and jobs in unity. It would be nice if you could create follow up with more examples associated with this topic

    • @LlamAcademy
      @LlamAcademy  2 года назад +3

      Thanks! I will definitely add more Jobs system tutorials to the list of topics to cover!

  • @LaughingMan44
    @LaughingMan44 5 месяцев назад

    In general in programming you should avoid constantly looking up indexes, where you do AliveEnemies[i] several times instead create a local variable like var aliveEnemy = AliveEnemies[i], then use aliveEnemy in your code, It may not sound like it'd make much of a difference but at scale or depending on how threading is handled it can make a significant performance impact, you can further optimize be avoiding using .Count or .Length in every loop iteration, by having a local variable like count = AliveEnemies.Count, and using that in your for loop args instead

  • @dr.cocainium
    @dr.cocainium 2 года назад

    nice man, we need more soft like this

  • @lawrence4301
    @lawrence4301 6 месяцев назад

    can you make an example that isnt revolving around just the player/accounts for other entities? this is cool

  • @SamuelM-ec4hv
    @SamuelM-ec4hv 9 месяцев назад +1

    Can this be used with OverlapSpheres? I'm still having a hard time understanding the Jobs system

    • @LlamAcademy
      @LlamAcademy  9 месяцев назад

      Yup: docs.unity3d.com/ScriptReference/OverlapSphereCommand.html

  • @syntax_error6882
    @syntax_error6882 2 года назад +1

    i'm at the third video of this very good serie.. i'm a bit late but the subject is not an easy one

  • @Aviral.Bharadwaj
    @Aviral.Bharadwaj 2 года назад +1

    This is a great example of jobs system but you can enable burst mode to even boost its performance to next level. What do you say about burst mode use case ?

    • @LlamAcademy
      @LlamAcademy  2 года назад +1

      I have not used burst specifically, but I do see a lot of people get some good performance benefits on top of jobs with it. So far I haven't tried to do anything so stressful that just job-ifying it didn't solve. Someone on reddit the other day was doing some stuff with Jobs + Burst and got some cool results for some computer simulation they were doing.

    • @Aviral.Bharadwaj
      @Aviral.Bharadwaj 2 года назад +1

      @@LlamAcademy Try to explore when you have got time :)
      Your content is superb :)

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

    Curious, was there any reason why the jobs were done in method instead of a struct with IJob or other interface?

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

      The SpherecastCommand is already "jobified" so the ScheduleBatch() call goes across the available threads. I think you can further optimize this by doing the setup of the commands in an IJob to decrease the amount of time spent on the main thread preparing the jobs.

  • @martin.berisso
    @martin.berisso 2 года назад

    Hi! is there a way to create navmeshes for AR? or would you recommend a different tool for that?

    • @LlamAcademy
      @LlamAcademy  2 года назад

      I haven’t specifically worked with AR and NavMeshes, but you can build a navmesh on any 3D topology, so I don’t see why not.

  • @haim96
    @haim96 Год назад

    for some reason the enemy always spot the player... no meter what layermask i set... if i put a wall between the enemy and player what layer should i set it to make the enemy ignore the player?

    • @LlamAcademy
      @LlamAcademy  Год назад

      I think I'd need a little more information. Usually when that happens either the layer mask set up for the spherecast is not properly configured, the objects to be hit are not on the right layer, or they do not have valid colliders.

    • @haim96
      @haim96 Год назад

      @@LlamAcademy still can't get it to work. the layer mask i set in the script, what they should be? the walls that block the sight? the player collider?

  • @devanandthakur7617
    @devanandthakur7617 2 года назад +1

    Will start to learn it tomorrow, lets be patient pips! Godbless us haha

  • @mii9546
    @mii9546 2 года назад

    Ez profit bro, can you make opensea bid bot please?

  • @ailtonferreira5620
    @ailtonferreira5620 2 года назад

    Aye mucca

  • @JackoDonbeats
    @JackoDonbeats 2 года назад

    Sa

  • @teamharaskals8571
    @teamharaskals8571 2 года назад

    Sae