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 osisdie · Jul 15, 2013 at 09:12 AM · particlessphere

Particle emitter to emit onto different mesh(position)

I dynamically clone a lot of Mesh Partical Emitter gameobjects, layouting them to specific positions (in the top of quads as the first picture shows.) at runtime. However I have to destroy them when each emitter object's duration is over. Is there a way to accomplish this without instantiating and destroying them so frequently ?

The process is like this :

  1. in my scene, put a sphere added a mesh particle emitter as my clone base

  2. disable its emitter on Start() in the script

  3. clone and enable emitter(the new one) on demand

thanks ~

alt text alt text

particle1.jpg (42.7 kB)
particle2.jpg (36.5 kB)
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

1 Reply

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

Answer by dorpeleg · Jul 15, 2013 at 01:43 PM

Either use .SetActive(true/false).

Or use any of the particle system function ParticleSystem (Shuriken).

If you are using legacy, see this ParticleEmitter.

All the functions will be used to turn the particles on and off.

If you wish to really destroy them, there is no other way then to use instantiating and destroying.

Comment
Add comment · Show 5 · 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 osisdie · Jul 16, 2013 at 01:46 AM 0
Share

yes, I'm using lagacy. as u can see in the picture, the area to emit particle is not regular, that's why I choose to create a small size object with a emitter in a small square. Therefore my idea of solution is to copy these emitters to each square I want.

avatar image dorpeleg · Jul 16, 2013 at 06:40 AM 0
Share

If you can have all the square full with particle during your game, then I think it will be best to place them upfront and just turn them on and off as you need to (no instantiating and destroying).

If there is a limited amount of particles (only up to 8 for example), then only create the max amount upfront and re-position them to where you need during run-time (again, no instantiating and destroying).

avatar image osisdie · Jul 16, 2013 at 08:49 AM 0
Share

well, though I couldn't make sure how large the gird will be, I still will think about those ways, thanks.

avatar image dorpeleg · Jul 16, 2013 at 09:03 AM 0
Share

If all your grid section will have particles, then the amount does not mater.

If you are generating your grid at run-time (random size each time) and can't place the particles upfront, then use a loop to instantiate the right amount of particles in the right locations.

But, do this only once, once that is done, only turn on/off your particles when needed.

Do not use destroy and instantiate if you can avoid it.

If this helped you, please mark the question as answered.

avatar image osisdie · Jul 16, 2013 at 12:11 PM 0
Share

thanks, u gave me a lot of choices to do and think. I'll choice the suitable one on depends.

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

16 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

Related Questions

Shuriken/ World Colider Problem Unity 4.1 - Particle just shown inside a Sphere 1 Answer

[SOLVED] Shooting from Elemental Staff 1 Answer

How to contain particles in a circle (or sphere) 0 Answers

Turning my grid of particles into a sphere 0 Answers

Emit particules facing random direction 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