<?xml version="1.0" encoding="UTF-8" standalone="yes"?><oembed><version><![CDATA[1.0]]></version><provider_name><![CDATA[Stuart&#039;s Pixel Games]]></provider_name><provider_url><![CDATA[http://stuartspixelgames.com]]></provider_url><author_name><![CDATA[SPG]]></author_name><author_url><![CDATA[https://stuartspixelgames.com/author/stuie89/]]></author_url><title><![CDATA[How To Use 2D Sprites With a Particle Emitter &#8211;&nbsp;Unity]]></title><type><![CDATA[link]]></type><html><![CDATA[<div class="wp-block-image">
<figure class="aligncenter size-large"><a href="https://www.humblebundle.com/g/puzzledorf"><img data-attachment-id="7638" data-permalink="https://stuartspixelgames.com/wide-ad/" data-orig-file="https://stuartspixelgames.files.wordpress.com/2022/04/wide-ad.png" data-orig-size="1920,586" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="wide-ad" data-image-description="" data-image-caption="" data-medium-file="https://stuartspixelgames.files.wordpress.com/2022/04/wide-ad.png?w=300" data-large-file="https://stuartspixelgames.files.wordpress.com/2022/04/wide-ad.png?w=1024" src="https://stuartspixelgames.files.wordpress.com/2022/04/wide-ad.png?w=736" alt="" class="wp-image-7638" srcset="https://stuartspixelgames.files.wordpress.com/2022/04/wide-ad.png?w=736 736w, https://stuartspixelgames.files.wordpress.com/2022/04/wide-ad.png?w=1472 1472w, https://stuartspixelgames.files.wordpress.com/2022/04/wide-ad.png?w=150 150w, https://stuartspixelgames.files.wordpress.com/2022/04/wide-ad.png?w=300 300w, https://stuartspixelgames.files.wordpress.com/2022/04/wide-ad.png?w=768 768w, https://stuartspixelgames.files.wordpress.com/2022/04/wide-ad.png?w=1024 1024w" sizes="(max-width: 736px) 100vw, 736px" /></a></figure></div>


<p>This article teaches you how to use <strong>Sprites</strong> or other custom <strong>2D images</strong> with the <strong>particle emitter</strong> in <strong>Unity</strong>. I used this technique to create particle animations in my game, <strong><a href="https://www.humblebundle.com/g/puzzledorf">Puzzledorf</a></strong>. Whenever you do something right in the puzzle, particles explode.</p>


<div class="wp-block-image">
<figure class="aligncenter size-large"><a href="https://www.humblebundle.com/g/puzzledorf"><img data-attachment-id="5636" data-permalink="https://stuartspixelgames.com/blockoncrossexplosion/" data-orig-file="https://stuartspixelgames.files.wordpress.com/2021/09/blockoncrossexplosion.gif" data-orig-size="423,365" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="blockoncrossexplosion" data-image-description="" data-image-caption="" data-medium-file="https://stuartspixelgames.files.wordpress.com/2021/09/blockoncrossexplosion.gif?w=300" data-large-file="https://stuartspixelgames.files.wordpress.com/2021/09/blockoncrossexplosion.gif?w=423" src="https://stuartspixelgames.files.wordpress.com/2021/09/blockoncrossexplosion.gif?w=423" alt="" class="wp-image-5636" /></a></figure></div>


<p></p>



<p>1. Create your <strong>sprite </strong>and import it to Unity (look <strong><a href="https://stuartspixelgames.com/2020/07/31/how-to-import-sprite-sheets-unity/">here</a></strong> if you haven&#8217;t done that before) </p>



<ul><li>Create the <strong>sprite </strong>graphic</li><li>Import to Unity &#8211; it&nbsp;<strong>cannot</strong> be part of a sprite sheet, but must be single, <strong>standalone sprite</strong>, as of Unity 2018.3.4</li></ul>



<p>2. Create a new <strong>material </strong>in Unity</p>



<p>3. Add the <strong>Sprite </strong>to the <strong>material </strong></p>



<ul><li>Unity keeps on changing how this works, but as of 2018.3.4f&#8230;</li><li>Change the shader type of the material to:&nbsp;<strong>GUI &gt; Text Shader&nbsp;</strong>in 2018, in 2019.4.32f1 I found <strong>UI &gt; Unlit &gt; Detail </strong>worked better (some of the other options either won&#8217;t let you use a texture or won&#8217;t let you change the sprites colour in the emitter, you might need to try a few different unlit textures depending on your Unity version)</li><li>Drag your sprite on as the texture</li></ul>



<figure class="wp-block-image size-large"><a href="https://stuartspixelgames.files.wordpress.com/2021/10/image-16.png"><img data-attachment-id="6780" data-permalink="https://stuartspixelgames.com/image-16/" data-orig-file="https://stuartspixelgames.files.wordpress.com/2021/10/image-16.png" data-orig-size="384,195" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="image-16" data-image-description="" data-image-caption="" data-medium-file="https://stuartspixelgames.files.wordpress.com/2021/10/image-16.png?w=300" data-large-file="https://stuartspixelgames.files.wordpress.com/2021/10/image-16.png?w=384" src="https://stuartspixelgames.files.wordpress.com/2021/10/image-16.png?w=384" alt="" class="wp-image-6780" srcset="https://stuartspixelgames.files.wordpress.com/2021/10/image-16.png 384w, https://stuartspixelgames.files.wordpress.com/2021/10/image-16.png?w=150 150w, https://stuartspixelgames.files.wordpress.com/2021/10/image-16.png?w=300 300w" sizes="(max-width: 384px) 100vw, 384px" /></a></figure>



<p>4. Create a new <strong>particle system </strong></p>



<p>5. Find the renderer on the <strong>particle system</strong></p>



<figure class="wp-block-image size-large"><a href="https://stuartspixelgames.files.wordpress.com/2021/10/image-17.png"><img data-attachment-id="6782" data-permalink="https://stuartspixelgames.com/image-17/" data-orig-file="https://stuartspixelgames.files.wordpress.com/2021/10/image-17.png" data-orig-size="365,217" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="image-17" data-image-description="" data-image-caption="" data-medium-file="https://stuartspixelgames.files.wordpress.com/2021/10/image-17.png?w=300" data-large-file="https://stuartspixelgames.files.wordpress.com/2021/10/image-17.png?w=365" src="https://stuartspixelgames.files.wordpress.com/2021/10/image-17.png?w=365" alt="" class="wp-image-6782" srcset="https://stuartspixelgames.files.wordpress.com/2021/10/image-17.png 365w, https://stuartspixelgames.files.wordpress.com/2021/10/image-17.png?w=150 150w, https://stuartspixelgames.files.wordpress.com/2021/10/image-17.png?w=300 300w" sizes="(max-width: 365px) 100vw, 365px" /></a></figure>



<p>6. Find the&nbsp;<strong>material</strong> on the renderer. Change that to your new material with your sprite there </p>



<figure class="wp-block-image size-large"><a href="https://stuartspixelgames.files.wordpress.com/2021/10/image-18.png"><img data-attachment-id="6784" data-permalink="https://stuartspixelgames.com/image-18/" data-orig-file="https://stuartspixelgames.files.wordpress.com/2021/10/image-18.png" data-orig-size="374,86" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="image-18" data-image-description="" data-image-caption="" data-medium-file="https://stuartspixelgames.files.wordpress.com/2021/10/image-18.png?w=300" data-large-file="https://stuartspixelgames.files.wordpress.com/2021/10/image-18.png?w=374" src="https://stuartspixelgames.files.wordpress.com/2021/10/image-18.png?w=374" alt="" class="wp-image-6784" srcset="https://stuartspixelgames.files.wordpress.com/2021/10/image-18.png 374w, https://stuartspixelgames.files.wordpress.com/2021/10/image-18.png?w=150 150w, https://stuartspixelgames.files.wordpress.com/2021/10/image-18.png?w=300 300w" sizes="(max-width: 374px) 100vw, 374px" /></a></figure>



<p>Now you have a particle emitter that uses sprites as the graphic it emits. You can control and manipulate it with scripts like any other game object.</p>



<figure class="wp-block-image size-large"><a href="https://stuartspixelgames.files.wordpress.com/2021/10/particle-emitter-gif-spg-blog.gif"><img data-attachment-id="6786" data-permalink="https://stuartspixelgames.com/particle-emitter-gif-spg-blog/" data-orig-file="https://stuartspixelgames.files.wordpress.com/2021/10/particle-emitter-gif-spg-blog.gif" data-orig-size="318,305" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="particle-emitter-gif-spg-blog" data-image-description="" data-image-caption="" data-medium-file="https://stuartspixelgames.files.wordpress.com/2021/10/particle-emitter-gif-spg-blog.gif?w=300" data-large-file="https://stuartspixelgames.files.wordpress.com/2021/10/particle-emitter-gif-spg-blog.gif?w=318" src="https://stuartspixelgames.files.wordpress.com/2021/10/particle-emitter-gif-spg-blog.gif?w=318" alt="" class="wp-image-6786" /></a></figure>



<div class="is-layout-flow wp-block-group"><div class="wp-block-group__inner-container">
<p class="has-text-align-center has-medium-font-size"><strong>If you enjoyed reading, try my game <a href="https://www.humblebundle.com/g/puzzledorf">Puzzledorf</a>.</strong></p>
</div></div>


<div class="wp-block-image">
<figure class="aligncenter size-large"><a href="https://www.humblebundle.com/g/puzzledorf"><img data-attachment-id="7638" data-permalink="https://stuartspixelgames.com/wide-ad/" data-orig-file="https://stuartspixelgames.files.wordpress.com/2022/04/wide-ad.png" data-orig-size="1920,586" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="wide-ad" data-image-description="" data-image-caption="" data-medium-file="https://stuartspixelgames.files.wordpress.com/2022/04/wide-ad.png?w=300" data-large-file="https://stuartspixelgames.files.wordpress.com/2022/04/wide-ad.png?w=1024" src="https://stuartspixelgames.files.wordpress.com/2022/04/wide-ad.png?w=736" alt="" class="wp-image-7638" srcset="https://stuartspixelgames.files.wordpress.com/2022/04/wide-ad.png?w=736 736w, https://stuartspixelgames.files.wordpress.com/2022/04/wide-ad.png?w=1472 1472w, https://stuartspixelgames.files.wordpress.com/2022/04/wide-ad.png?w=150 150w, https://stuartspixelgames.files.wordpress.com/2022/04/wide-ad.png?w=300 300w, https://stuartspixelgames.files.wordpress.com/2022/04/wide-ad.png?w=768 768w, https://stuartspixelgames.files.wordpress.com/2022/04/wide-ad.png?w=1024 1024w" sizes="(max-width: 736px) 100vw, 736px" /></a></figure></div>]]></html><thumbnail_url><![CDATA[https://stuartspixelgames.files.wordpress.com/2017/09/unityfeature.png?fit=440%2C330]]></thumbnail_url><thumbnail_width><![CDATA[415]]></thumbnail_width><thumbnail_height><![CDATA[255]]></thumbnail_height></oembed>