Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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
0
Question by arkon · May 25, 2012 at 04:59 AM · particlespoolrecycle

Recycling particle emitter leaves particles in 2 locations instead of 1

I have a blood splatter system to reuse the blood splatter particle effects so I don't have to instantiate/destroy them all the time. I have an array of 5 game objects with blood particle effects attached. the problem is when I reuse one of them the blood effect appears in both the new location and the old location (well a slightly diminished version in the old location).

If I instantiate and destroy it all works fine. but I want to recycle the pool of objects. I just set the new position and set emit to true. Why does the effect when reused show up in 2 positions? how do I fix it? And no I don't want to instantiate and destroy to fix it.

Comment
Add comment · Show 1
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 hijinxbassist · May 25, 2012 at 05:05 AM 1
Share

Do you start emission before or after the particle system is in its new location?

3 Replies

· Add your reply
  • Sort: 
avatar image
3
Best Answer

Answer by rutter · May 25, 2012 at 07:36 AM

Moving an emitter will not necessarily disable or alter any particles it has already emitted. This is actually very important -- suppose you have an NPC carrying a lit torch, would you want the character's movement to also move any smoke or sparks the torch is emitting?

If you're using Shuriken particles, you might try calling Clear() on the ParticleSystem to "reset" it before starting emission.

If you're using Unity's legacy particles, there is a very similar ClearParticles() method for the ParticleEmitter.

Comment
Add comment · Show 1 · 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 arkon · May 27, 2012 at 01:09 PM 0
Share

Thanks I;ll give it a try.

avatar image
1

Answer by Kameesabee · Aug 24, 2013 at 05:30 PM

Nope, this doesn't seem to fix it on my end. I'm using the new shuriken system. Do you deactivate the game object when it is being stored?

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
avatar image
0

Answer by JohnPoison · Apr 09, 2015 at 10:54 AM

I was able to solve this problem with following code

 // required to fix a bug of unity when it doesn't clear all the particles and its position
 ps.Simulate(0f, true, true);

 ps.Stop(true);
 ps.Clear(true);
 ps.Play(true);

Important note: you should call this code right after you reuse particles, and ONLY after you have updated the transform of your particle system.

Also I notice that such problem appears only with world-space simulation particles.

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

8 People are following this question.

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

Related Questions

Recycling particle system 1 Answer

Android: FPS halt when doing things for the first time 2 Answers

Immortal enemies when reanimated, or pooled game objects re-activated do not respond to collisions? 1 Answer

Freeze lag with object pool/recycler, why? 2 Answers

Turning on and off Particle effects 2 Answers


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