Introduction to Object Pooling in Unity | Object Pooling Tutorial

Sdílet
Vložit
  • čas přidán 28. 08. 2024

Komentáře • 17

  • @KaboomofdoomStream
    @KaboomofdoomStream Před 2 lety +3

    This is the sexiest topic you've covered so far! I love this stuff.

    • @LlamAcademy
      @LlamAcademy  Před 2 lety

      🙏😃 I guess sometimes performance is sexy!

  • @romanbakovskyi5305
    @romanbakovskyi5305 Před rokem +1

    I'm on my way to creating own game with a friend and we already have some enemies and AI on 'em but your videos about AI or this one and discovering the concept of GC - man, those videos are of such high quality, I mean they are really teaching you how to approach certain concepts like "why should you" or "why shouldn't you". I'm grateful to universe that you exist :)

  • @sg1slate
    @sg1slate Před 3 lety +7

    I wish you'd make the text bigger, is a bit difficult to read. Otherwise thanks for the tutorial

    • @LlamAcademy
      @LlamAcademy  Před 3 lety +1

      Thank you for the feedback! I'll be sure to make text bigger in the future!

    • @Ankh_Ramses
      @Ankh_Ramses Před 2 lety

      I know this reply is late, but he has a link in the description to the code he used, if that matters

  • @maximusthegreatest
    @maximusthegreatest Před rokem

    Great video helped alot!

  • @anchalindavis5569
    @anchalindavis5569 Před 3 lety +2

    how did you correct the Parent error at7:15

    • @LlamAcademy
      @LlamAcademy  Před 3 lety

      When we go to the PoolableObject class at 8:41 we add the Parent reference!

  • @elric7371
    @elric7371 Před 2 lety +2

    Really good tutorial. Im trying it in 3D, When the enemy shoots it doesn't shoot in the direction they are facing but all in one direction. Any clues on how to fix it.

    • @LlamAcademy
      @LlamAcademy  Před 2 lety +1

      You probably need to assign the direction of your bullet to the current game object's forward instead of something like Vector3.right.

    • @elric7371
      @elric7371 Před 2 lety

      @@LlamAcademy Thanks for the response ,appreciate it. I tried something like "rigidbody.velocity= transform.parent.forward * 8f;" and it worked just the first shot still goes to global forward buts its fine.

  • @FakeDani69
    @FakeDani69 Před 2 lety

    I have used this pooling method to spawn enemies (AI part 4 as you suggested in the video to watch object pooling) but after spawning the first enemy, the other spawned enemies don't implement their code like (they are not calling their methods anymore just the first one used it) can you help me on this would be great!

    • @LlamAcademy
      @LlamAcademy  Před 2 lety +1

      Hmm.. Hard to say from here. I can guess that maybe some refactoring on EnemyMovement.cs to remove the following from Start() around this time: czcams.com/video/5uO0dXYbL-s/video.html wasn't implemented and that makes it so only the first enemy works in an ObjectPool.
      Can you check out the github repo for AI Series Part 4: github.com/llamacademy/ai-series-part-4
      and compare what you have versus what is there?

  • @hosseinse4079
    @hosseinse4079 Před rokem +1

    you still did not learnt to zoom code in this videos