Multiple Sprites With One Particle System (Unity Tutorial)

Sdílet
Vložit
  • čas přidán 22. 08. 2024
  • In this Unity tutorial I show you how to use multiple single sprites with the particle system. We use a texture atlas, cut our sprites using the Sprite Editor. Then use the Texture Sheet Animation component on the particle effect to allow multiple sprites to be used and emitted from the particle system.
    🎁 Get OVER 225+ scripts & projects on my PATREON:
    ➡️Main Link: bit.ly/SpeedTut...
    ➡️Full List: tinyurl.com/ST...
    ·························································································
    ➡️(My Game) Left Alone on Steam: tinyurl.com/Lef...
    🔥SpeedTutor Unity Store: bit.ly/STUnity...
    🔥 INSANE UNITY SAVINGS: bit.ly/UnitySa...
    🕹️Unity Sales: bit.ly/UnitySa...
    🕹️Quick-Start Bundle: bit.ly/UnityQu...
    🕹️Weekly Publisher Sale (+FREE Asset): bit.ly/WeeklyP...
    🕹️Unity New Release Discount Sale: prf.hn/l/BdvEmg3
    🔥 INSANE UNITY SAVINGS: bit.ly/UnitySa...
    🕹️Unity Sales: bit.ly/UnitySa...
    🕹️Quick-Start Bundle: bit.ly/UnityQu...
    🕹️Weekly Publisher Sale (+FREE Asset): bit.ly/WeeklyP...
    🕹️Unity New Release Discount Sale: prf.hn/l/BdvEmg3
    🔥 INSANE HUMBLE SAVINGS: bit.ly/HumbleB...
    🕹️*NEW* Unity Prototype Asset Bundle: bit.ly/UnityPr...
    🕹️*NEW* Unity Environment Massive Bundle: tinyurl.com/Un...
    🕹️Synty Humble Bundle: tinyurl.com/Sy...
    🕹️Unreal Environment Mega Bundle: tinyurl.com/38b...
    🔥 FANATICAL GAMEDEV BUNDLES: fas.st/t/HYxySc2q
    🕹️Fanatical Bundle Savings (+20% OFF): bit.ly/Fanatic...
    🕹️TopDown RPG 2D Assets Bundle: tinyurl.com/Top...
    🕹️Dark Worlds Music Bundle: tinyurl.com/Dar...
    🕹️Game Design Assets Bundle: tinyurl.com/56x...
    🔥Synty Discounts & Savings: bit.ly/SyntyLo...
    🔥Unity Pro Deals: bit.ly/UnityPr...
    🔥Topcashback: bit.ly/Topcash...
    ·························································································
    💰BIG DISCOUNTS on my website, for my UNITY ASSETS:
    ➡️www.speed-tuto...
    💬Join the Community Discord:
    ➡️ / discord
    💝 Make a donation to the channel:
    ➡️www.paypal.me/s...
    ·························································································
    ⬇️ SpeedTutor Puzzle Assets:
    🧩Unity Store: bit.ly/STUnity...
    🧩My Website Discounts: www.speed-tuto...
    ⬇️ SpeedTutor Best Selling Assets:
    🧩Adventure Puzzle Kit: bit.ly/STAdven...
    🧩 Note & Letter System: bit.ly/STNoteL...
    🧩Examine System: bit.ly/STExami...
    🧩Keypad System: bit.ly/STKeypa...
    ⬇️SpeedTutor Model Packs:
    🧩Unity Store: bit.ly/STUnity...
    🧩My Website Discounts: www.speed-tuto...
    My Assets include: Gas Mask, Flashlight, Generator, Themed Key , Padlock, Phone, Chess Puzzle, Lever, Valve Puzzle, Fuse Box & Safe Systems. Cardboard, Debris, Massive Models and more!
    ························································································
    ⭐ Connect with me:
    💬| Discord: / discord
    🐦| Twitter: / speedtutor
    📱 | Facebook: / speedtutoruk
    🖥 | Website: www.speed-tutor...
    ·······················································································

Komentáře • 69

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

    Let me sprinkle some particles on your life! A new thumbnail, what do you think? Need some OPINIONS! :D
    🕹Unity New Year Sale (Exp: 11 Jan 22): bit.ly/UnityNewYear21Sale
    🕹Check out all the Humble Bundle Deals: bit.ly/HumbleBundleDeals
    🎁 Get OVER 115 Scripts, Projects on my PATREON HERE:
    bit.ly/SpeedTutorPatreon

  • @WhiteKnuckleRide512
    @WhiteKnuckleRide512 Před rokem +3

    Was working on an Asteroids clone and wanted to have the asteroids explode into multiple types of chunks, this was exactly what I was looking for. Thanks!

    • @SpeedTutor
      @SpeedTutor  Před rokem +1

      You're very welcome! :D I'm glad it worked out for you.

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

    Just what I need! I was struggling with my particle system and you save me so much time by explaining correctly the sprite function!

    • @SpeedTutor
      @SpeedTutor  Před 2 lety

      I'm really glad you found this helpful! :D

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

    Great video and thanks for sharing! You can also slice by clicking Sprite editor - Slice - automatic or by cell size on the top left. Second button from left. With 4 picture it really isn't a time saver but when you have to do them hundreds of times, like I did in one project then it becomes really useful

    • @SpeedTutor
      @SpeedTutor  Před 2 lety

      That's a really good piece of advice! Do you have to make sure they'll all uniform distance apart?

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

    Another great particle system tutorial for Unity, thanks man keep them coming!

    • @SpeedTutor
      @SpeedTutor  Před 2 lety

      I will do, thanks for watching my friend! :)

  • @z1atk-y9u
    @z1atk-y9u Před 4 měsíci +1

    Thanks! Concise and easy to follow!

    • @SpeedTutor
      @SpeedTutor  Před 4 měsíci

      I'm really glad you found it useful, what are you creating? :D

  • @a3dadventure79
    @a3dadventure79 Před 5 měsíci +1

    thx much. it's a really important thing to be able to do and it is not explain well enough and nearly enough, so bravo. this was a great tutorial!

    • @SpeedTutor
      @SpeedTutor  Před 5 měsíci

      I really hope you found it useful :)

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

    Exactly what i needed, I was stuck on the "all sprite on same atlsa". Thanks a lot. cool video :)

    • @SpeedTutor
      @SpeedTutor  Před 2 lety

      I'm really glad to hear it was helpful! :) Any tips for others, do let me know! :)

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

    youtube recommended this to me and i learned something new. Thanks

    • @SpeedTutor
      @SpeedTutor  Před 2 lety

      Haha, thanks for coming to check this out! :D

  • @rootbindev
    @rootbindev Před 4 měsíci +1

    how did I not know about this! this is great even if I only have 1 sprite

    • @SpeedTutor
      @SpeedTutor  Před 4 měsíci

      You're very welcome! What are you going to create? :o

    • @rootbindev
      @rootbindev Před 4 měsíci

      @@SpeedTutor A game about eggs

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

    Thanks!

    • @SpeedTutor
      @SpeedTutor  Před 2 lety

      I really appreciate that, my dude! I've never had one of these thanks before, haha. Good luck with your project all the same! :D

  • @shirinkamisami4487
    @shirinkamisami4487 Před 2 měsíci +1

    Thank you soo much

    • @SpeedTutor
      @SpeedTutor  Před 2 měsíci

      You're very welcome, what are you going to be making?

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

    great video, very helpful. thank you :)

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

      You're very welcome, Nubcake! :P

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

    Amazing video! thank you!!

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

      That's no problem at all, Bernard! Thanks for watching, my friend! :D

  • @santiagodeolaso4846
    @santiagodeolaso4846 Před rokem +1

    Thank you man

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

    Great, thank you 😀

    • @SpeedTutor
      @SpeedTutor  Před 2 lety

      That's no problem at all, thanks for coming along to watch! :D

  • @SelaMalka
    @SelaMalka Před rokem +1

    thank you!

  • @Maurilustrador
    @Maurilustrador Před měsícem

    And what about the material? does the material need have the same texture? or a material with a blank space on the albedo also works?

  • @ItsAkile
    @ItsAkile Před rokem +2

    The Particle System was my friend all along, why it go to flicker my sprites

    • @SpeedTutor
      @SpeedTutor  Před rokem

      It never left your side :)

    • @ItsAkile
      @ItsAkile Před rokem

      @@SpeedTutor 🤔 Any thoughts on why it flickers as a sprite sheet ?

    • @SpeedTutor
      @SpeedTutor  Před rokem

      I'm sorry I can't be more helpful, I'm not really sure about this one. Anything you can throw into Google?

    • @ItsAkile
      @ItsAkile Před rokem

      @@SpeedTutordidn't find it on google but My lazy Sprite sheet was at fault, I got it. Thanks though, now to try adding it to Collison to add to my animations etc

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

    Just wanted to comment on that glorious 60s radio... 😂

    • @SpeedTutor
      @SpeedTutor  Před 2 lety

      Haha, you can have it for Christmas! It's on the Unity store for FREE! :D

    • @babaganoosh1969
      @babaganoosh1969 Před 2 lety

      To be honest I do need one...more of the type they used on Gilligan's Island though

  • @toreysoo7248
    @toreysoo7248 Před 4 měsíci

    Hi! Is it possible for me to use different sprites (for animation) on particle. I wanna make bug flies using particle effect

    • @SpeedTutor
      @SpeedTutor  Před 4 měsíci

      You'd most likely want to use a sprite sheet for that but I do have a tutorial on creating flies! :)

  • @skylerRU
    @skylerRU Před rokem

    Any idea why my sprites are showing up as purple? The sizes change accordingly but the texture doesnt

    • @SpeedTutor
      @SpeedTutor  Před rokem

      That sounds like a material / shader issue? Have you checked the material?

  • @RSinist-12
    @RSinist-12 Před rokem

    Thanks for the tutorial! Is there something that needs to be done with Renderer or the material in Renderer? I've set up my Texture Sheet Animation as you have here, but I'm still getting the default purple squares being emitted.

    • @SpeedTutor
      @SpeedTutor  Před rokem

      What pipeline are you using?

    • @RSinist-12
      @RSinist-12 Před rokem +1

      @@SpeedTutor Thanks for the response. I'm still pretty new to Unity, so whatever is the default. I haven't setup a specific pipeline. Regardless, I've already solved my issue via other means as I ultimately wanted to animate each particle through each sprite in the spritesheet, which I now have working. Thanks again!

    • @SpeedTutor
      @SpeedTutor  Před rokem

      Oh awesome, good job! :D Thanks for checking this out, needless to say. :)

  • @MindChamber
    @MindChamber Před 2 lety

    any way to randomize 'Animated' sprites?

    • @SpeedTutor
      @SpeedTutor  Před 2 lety

      I'm not sure about that question, sorry I can't be more specific!

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

      @@SpeedTutor thats fine I couldnt find any other way but to make a new particle system for each animated sprite and just embed them into a single prefab

  • @aalperbayram
    @aalperbayram Před rokem

    Is there a way to burst all of the sprites by keeping their order same as the atlas? For example; I have a 3x3 sprite atlas and I wanna emit all 9 sprites at the same time and positioned as same as the atlas order from 1 to 9. This is to achieve a shatter effect.

    • @SpeedTutor
      @SpeedTutor  Před rokem

      That is a very good question and I'm really not sure about that one. Can you set the array in the atlas?

    • @aalperbayram
      @aalperbayram Před rokem

      ​@@SpeedTutor I did but couldn't get the particle emitter to follow it. Texture Sheet Animation tab has the 'Random Between Two Constants' option but what I need is 'Integer Between To Constants' or 'Step Between Two Constants' or something. It would be tremendously useful to break objects.

    • @vainm
      @vainm Před rokem

      @@aalperbayram Merhaba, bu sorunu çözebildiniz mi yoksa farklı particle systemları oluşturmak zorunda mı kaldınız? Benzer bir problem yaşıyorum da..

    • @aalperbayram
      @aalperbayram Před rokem +1

      @@vainm Merhaba maalesef çözememiştim ve tekrar denemedim. Kodla çözülür gibi duruyor.

    • @vainm
      @vainm Před rokem +1

      @@aalperbayram Kodla start frame'leriyle oynayarak yapmaya çalışıyorum çok uzun süredir fakat başarısızım. Tüm particle'ları aynı anda editliyor. Sanırım vazgeçeceğim. Teşekkürler cevabınız için.

  • @ChirpyMisha
    @ChirpyMisha Před 2 lety

    I'm working on a mod for a game and I want the player to select one or more custom images for a particle system in the game. I can't use the Unity editor for this (everything needs to be done through code). Is it possible to do this all through code?
    Maybe I can load the images and manually make a texture sheet out of it. Then I can maybe somehow cut the sprites in the texture sheet after I've done that. And then I need to figure out how to assign that to the particle system. Am I on the right track?

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

      That's a really tough question but could you not create a large texture sheet with all the images that will be used in-game? Then once they're spliced, as long as you keep them equally spaced apart (In your texture sheet). You might be able to auto-slice them (You can within the sprite editor) and then they'll be accessible if you increment all the names based on how many I imagine you could have in an array or list. It's pure speculation by me and I'm sorry I can't be of more concrete help but it might be worth asking someone who has far more experience in it. I hope you work it out though! :)

    • @ChirpyMisha
      @ChirpyMisha Před 2 lety

      @@SpeedTutor Thank you very much for your reply!
      I want to user to be able to put their own images in a folder and then select the images they want to use so that they can easily change the selection in-game.
      But I suppose I should first keep things simple and require a texture sheet if the user wants multiple images 😅
      Thanks again 😊

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

      @@SpeedTutor I found a solution😄 I forgot to come back to this after I solved it, but here's what I did:
      The way I solved it is by using a Grid. This makes it a lot easier to implement. In fact, it turns it into just 12 lines of code.
      // To load the spritesheet:
      Texture2D myTexture = new Texture2D(2, 2);
      byte[] textureData = File.ReadAllBytes(filePath); // filePath is a string with the full path to the spritesheet file.
      ImageConversion.LoadImage(myTexture , textureData);
      // To set the spritesheet:
      Material material = myParticleSystem.gameObject.GetComponent()?.material;
      material.mainTexture = myTexture;
      // To configure the AnimationModule:
      TextureSheetAnimationModule texSheetAnimation = myParticleSystem.textureSheetAnimation;
      texSheetAnimation.enabled = true;
      texSheetAnimation.mode = ParticleSystemAnimationMode.Grid;
      texSheetAnimation.numTilesX = settings.imgCountX;
      texSheetAnimation.numTilesY = settings.imgCountY;
      texSheetAnimation.timeMode = ParticleSystemAnimationTimeMode.Lifetime;
      texSheetAnimation.startFrame = new MinMaxCurve(0, settings.imgCountX*settings.imgCountY);

  • @nikolas276
    @nikolas276 Před 4 měsíci

    why my particles are purple?

    • @SpeedTutor
      @SpeedTutor  Před 4 měsíci

      The material or shader might be an issue, you might need to look at that :)

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

    Great Video :D
    42 Likes its missing a 0 hehe :D

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

      Haha, thanks very much! Maybe if you create 350 more accounts to like the video? :P

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

      @@SpeedTutor hehe :D