Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
2 captures
13 Jun 22 - 14 Jun 22
sparklines
Close Help
  • 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
1
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
Add comment
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

· Add your reply
  • Sort: 
avatar image
0
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
Add comment · 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.

$$anonymous$$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
0

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
Add comment · 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

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

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

Particle system does not re-emit until Start Lifetime elapsed 4 Answers

Using Shuriken particles with HDRP on 1 Answer

How can I apply gravity to each particle within a 'Gravity Zone' region? 0 Answers

Shuriken mesh shape not prewarming 0 Answers

Particle System(Shuriken) optimization problem 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