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 Ludus · Nov 17, 2012 at 08:46 PM · particlesparticlebatchone

Emit only ONE PARTICLE and batching problems

I'm optimizing my game atm and so when my turret shoots, rather than spawn in an one-shot particle emitter (at least 1 draw call per one) I have a master emitter, who moves to the spot and emits once. So several turrets are sharing the same emitter for batching purposes.

This all works fine, my problem is limiting the amount of particles begin emitted. When I emit I want ONLY ONE particle being emitted every time I call it! But I can see nothing that lets me do this! The only choice I have are the min/max particle settings,having it set to Min/Max of one means ONLY ONE particle can be ONE SCREEN at any time (no good, I have many things shooting) and when set to lets say Min/Max of 1/100 means on the one frame I do emit, it emits an random amount between 1 and 100, so when there are a volley of turrets in a row, often 100 particles already exist already spawning in 0!

Anyone got any idea how to call ONE particle per emit BUT NOT limit the maximum amount of particles?

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
1

Answer by asafsitner · Nov 17, 2012 at 10:08 PM

I presume you're using `Play();` instead of `Emit(1);`

**More info here**

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 Ludus · Nov 18, 2012 at 01:19 AM 0
Share

Thanks! Works perfectly! Wasn't using either, was using the old legacy particles! Doh!

I've also noticed there's another emit function that would be even better! But I cannot get it to work at all, the argument wants the int again rather than this new one below. How do I call this emit when they are both called in the same way?

function Emit (pos : Vector3, velocity : Vector3, size : float, energy : float, color : Color) : void

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

10 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

Related Questions

Scale Shuriken Particle System with Parent Transform 5 Answers

Should I use a decal or particle system for bullet holes? 1 Answer

Particle Playback Error in 5.4 0 Answers

Get sprite id or grid x and y from particle on trigger. 0 Answers

Destroy particles based on bounds not lifetime 0 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