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 JeffreyD · Aug 22, 2013 at 08:11 PM · particleeffectoneshot

Is there oneshot particle settings in Unity 4.1.5?

Hi, I'm just learning Unit3D. I have version 4.1.5. I'm following the tutorial in this link https://www.youtube.com/watch?v=KPdHwQAK9k0&list=PLD47A8BE52CD8B4E5∈dex=15. It's very good but uses an older version of unity. So, is there a similar setting in Unity 4.1.5 that allows for particle setting "oneshot". If so, what were is it? If not, how can I do a "oneshot" particle effect in ver 4.1.5? Thank in advance for your help. Jeff link text

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 getyour411 · Aug 22, 2013 at 08:15 PM 0
Share

Uncheck 'looping' - ?

2 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by Steven-1 · Aug 22, 2013 at 08:38 PM

Under the Emission-tab, set Rate to 0 and use Bursts instead. The bursts will emit particles at specific times (so if you set time to 0 it will emit once at the creation of the particle system)

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 JeffreyD · Aug 22, 2013 at 09:47 PM

Hi, Thanks for this. I just tried it and it still emits particles. I set burst time to 0, particles to 1 (It was set to 10), Rate is 0. Loop is off.

What I'm trying to do is instantiate the particle effect when my ball hits something. The effect instantiates correctly (i.e., when the ball hits the wall), but because there is no oneshot setting it continues to emit even after the ball continues to bounce around. The result is particles spraying around at every place the ball has hit something. It looks cool but it's not what I want. I've tried to Destroy the particle instantiation but that doesn't seem to work either. I'm guessing that is because I don't know how to find the instantiated game object in order to destroy it. I can destroy the Ball (the gameObject) but I don't know how to Destroy the instantiated Particle effect. Here's the code.

var particle_splash : GameObject;

// var def at top of file. I "attach" this to GameObject particle_sparks in the Inspector window. The unity GameObject particle_sparks in the project folder area has the emitter particle_sparks (same name as the GameObject) attached to it.

// Collision detection handler for the Ball... // The emitter is instantiated when the ball hits something, which is handled by this function. // This script is attached to the Ball GameObject via the Inspector.

function OnCollisionEnter(collision : Collision)

{

// start the particle effect - This works.

Instantiate (particle_splash, transform.position, transform.rotation);

// In an attempt to destroy the particle effect, since the oneshot does not exist // I tried this Destroy set to delay 1 second before doing the destroy. // This does not work. Even though particle_splash is defined as a GameObject above.

Destroy(particle_splash, 1);

// When I try to destroy the gameObject (i.e., Destroy(gameObject);) // I end up destroying the Ball, which make sense since the script is connected to the ball

}

So, I'm open to learning how to either 1) Create a "OneShot" that works via the emitter settings. or 2) Learn the Java code to locate the particle_splash game object that was instantiated so that I can destroy it.

Thanks again in advance for all your help.

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

17 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

Related Questions

How to make particles move along a path in a particle system? 0 Answers

Performance drop when particle systems occupy the most part of the screen. 0 Answers

Another Scripting Question 1 Answer

How to make touch one frame in a 2D unity Game? 1 Answer

my partical fade away when the emitter moving fast ? 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