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
2
Question by Aubrey-Falconer · Feb 17, 2011 at 07:41 AM · editorparticleseditor-scriptingparticlesystem

How do you force a particle system to play all the time in the editor, not just when it is selected?

I need certain particle systems to play all the time while I am editing a scene, as opposed to playing only when they are selected. How should this be achieved?

Comment
Add comment · Show 2
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 Aubrey-Falconer · Feb 18, 2011 at 07:00 PM 0
Share

After a bit more experimentation, it appears the the Unity Editor doesn't even call Update() on objects unless they are selected. It looks ridiculous to have all the particle systems in my scene paused - especially when ParticleEmitter.Simulate() is broken and the systems don't even get a chance to warm up...

avatar image Statement · Mar 13, 2011 at 09:07 PM 0
Share

I think the Unity Editor calls Update when it's about to draw a new frame, such as when something changed in the scene.

5 Replies

· Add your reply
  • Sort: 
avatar image
7

Answer by Tortuap · Jul 18, 2014 at 12:32 PM

It is now possible, as of version 4.3 at least.

Select a Particle System. Open the editor in its own floating window. Then in the upper right corner of that window, click the lock button. The window is locked on the particle system and the particle system will play whatever your selection becomes.

If you need to do that with multiple particle system, it's a little bit tricky. Select another particle system you want to play. From the previous editor floating window, click the most upper right button (the little menu that all floating windows have, above the lock button) choose Add tab -> Inspector.

Repeat to add other system to be played.

This is clearly a bug exploit because if you close the locked editor windows, the particle system will continue to play :-)

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 Matjulski · Dec 09, 2017 at 08:37 AM 0
Share

It is possible to select multiple particle systems at once, in one inspector, and then locking it. This is useful for testing PS that start at the same time, or to have many PS running at the same time without having more than two inspectors open.

avatar image
1

Answer by Joshua · May 27, 2011 at 03:45 PM

It's not possible because the built-in script for particle systems is apperently written in a way where it will execute in edit mode if it's selected. Since you cannot change how the script works, you cannot change that. You can also not 'fake' it being selected.

What you say about Update() only being called on selected objects is nonsense. Update is called, if I remember correctly, when focus is on the scene-view every frame and every event, and when focus is on an other window every repaint and every event.

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 Jake-L · Feb 17, 2011 at 09:40 AM

Sorry, but this isn't possible with the buildin particle system!

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 Aubrey-Falconer · Feb 18, 2011 at 07:01 PM 1
Share

How do you know it isn't possible?

avatar image
0

Answer by Ashkan_gc · Mar 13, 2011 at 08:28 PM

there is only one way to execute your own scripts in edit mode for your object. you should add ExecuteInEditMode attribute to your script, but unfortunately nothing can not be done for particle systems. i don't know they might be executed in edit mode when you have a script with this attribute attached or at least a script with this attribute that calls particle related stuff.

Comment
Add comment · Show 3 · 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 Aubrey-Falconer · Mar 14, 2011 at 04:43 PM 0
Share

Nope, they're unfortunately not. This seems like such a simple issue, I'm honestly surprised no one has an answer.

avatar image Jake-L · Mar 31, 2011 at 11:31 AM 0
Share

Well, I'm honestly suprprised that two right answers and some good suggestions what you might want to try is not enough for you...

avatar image Aubrey-Falconer · May 27, 2011 at 03:40 PM 0
Share

Jake - I didn't mean that as a denigration of everyone's suggestions, but rather as genuine surprise that such a see$$anonymous$$gly straightforward issue doesn't have a simple solution. I have tried all the suggestions, and none of them work - but I am also not absolutely convinced that this is impossible. If anyone has other suggestions, I am most interested

avatar image
0

Answer by yeneZan · Sep 18, 2016 at 06:16 PM

@Aubrey Falconer It's maybe too late, but I had the same trouble and came up with a solution as below.

 time = GUILayout.HorizontalSlider(time, 0, ps.startLifetime * ps.duration);
 if(GUI.changed)
 {
      ps.time = time; //set value and play straightly
      //ps.Simulate(time, true, true); //usual api
 }
 

Withought select the ParticleSystem, multiplay is possible as well.

Will this could help another.

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

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

How to play a particle system from the editor without selecting it 1 Answer

Change Size over Lifetime for Particle System? 1 Answer

When and how to take a screenshot of a particle system from the editor? 0 Answers

Track passing time in EditorScript 1 Answer

in-editor cloning of game objects 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