• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
Question by DiligentGear · Feb 22, 2014 at 11:50 PM · particlesparticle systempauseshurikenemitter

How to pause emitter in new Particle System?

Is there anyway to only pause the emitter instead of the whole system?

I'm using particle system to create weather effects, like snowing and raining, but the problem is, when I pause the particle system, both particles and emitter are paused, so the raindrops and snows are frozen in the mid-air, which is not desirable.

Similarly, stop doesn't work as expected either. When the particle system is stopped, all of the particles are wiped out immediately, instead of waiting for their lifetime.

If I cannot control the emitter, how do I achieve such effect using particle system?

Before you answer, please note that none of these methods works:

  1. Emit() function does not follow the particle system's modules.

  2. Stop(), change emissionRate, playbackSpeed, enableEmission, will kill the particles

  3. Pause() will freeze the particles as I said above

  4. Stimulate() will pause the particles

  5. Particle system will stop if it emits more than maxParticles, so changing it will stop the system

Comment
getyour411

People who like this

1 Show 0
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

  • Sort: 
avatar image
Best Answer

Answer by Kibsgaard · Feb 23, 2014 at 12:46 AM

 particleSystem.Stop();

Here that stops the emission and lets the currently active particles live.

Add a Particle System to a game object and this script:

 void Update () {
         if(Input.GetKeyDown(KeyCode.Space))
             particleSystem.Stop();
         if(Input.GetKeyUp(KeyCode.Space))
             particleSystem.Play ();
     }

When you hold space the emitter pauses, while the particles keep flying.

Comment

People who like this

0 Show 9 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image DiligentGear · Feb 23, 2014 at 01:03 AM 0
Share

I tried using stop(), it only lives for about one second. Any clue what might be wrong?

avatar image Kibsgaard · Feb 23, 2014 at 01:24 AM 0
Share

Do you mean that the particles only live for one second? Just increase particleSystem.startLifetime.

E.g. increasing their lifetime to 10 seconds:

 particleSystem.startLifetime = 10;
avatar image DiligentGear · Feb 23, 2014 at 01:32 AM 0
Share

The particles only lived for about one second after I called the function Stop(). The startLifetime is about 20 second,which made me so confused why particles disappear...

avatar image Kibsgaard · Feb 23, 2014 at 01:38 AM 0
Share

That is weird. There is no other script disabling either the particle emitter or the game object which it is attached to?

avatar image DiligentGear · Feb 23, 2014 at 01:43 AM 0
Share

Both particle system and game object are always active in the scene, and no other script is related to them Do note that I'm not using legacy particle emitter, but the new Shuriken particle system.

Show more comments
avatar image

Answer by MikePauza · Jan 10, 2019 at 03:09 PM

Using Unity 2018.3 on both Mac & PC:

On both the code is automatically changed. It works on PC, but only works sporadically on Mac.

Comment

People who like this

0 Show 0 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Unity Answers is in Read-Only mode

Unity Answers content will be migrated to a new Community platform and we are aiming to launch a public beta on June 13. Please note, Unity Answers is now in read-only so we can prepare for the final data migration.

For more information and updates, please read our full announcement thread in the Unity Forum.

Follow this Question

Answers Answers and Comments

21 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Accessing Particle emitter 0 Answers

Particle System Overhead 6 Answers

Sub Emitter problems 2 Answers

Inherit velocity in shuriken particle system goes haywire in build version 0 Answers

Multiple trails behind one particle? 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges