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 eatsleepindie · Jun 03, 2012 at 10:20 PM · objectparticlesystemparticleemitterattached

Particle System doesn't have emitter but is emitting particles

I'm using Unity 3.5, and I never really used the particle system before 3.0 was released. The 'Particle System' I've added in 3.5 seems to be a complete particle system, as described in the documentation.. Animator, Emitter and Renderer in one System attached to my Game Object. I run the game and the particles are emitted as expected, so my lack of experience with Unity's particle systems is making me second guess whether there is actually a particle emitter with the particle system that is seemingly emitting particles. The frustration comes from trying to loop through the particles in a script attached to the GameObject... the console claims that I do not have a particle emitter, even though my particle system is emitting particles.

I've tried :

 Particle[] particles = transform.GetComponent<ParticleSystem>().particleEmitter.particles;

And :

 Particle[] particles = GetComponent<ParticleSystem>().particles;

And :

 Particle[] particles = particlesEmitter.particles;

No matter what I try, the console always says

'There is no 'ParticleEmitter' attached to the "StarsGreen" game object, but a script is trying to access it.',

Even though my particle system is clearly creating green stars on the screen. When I added the particle system, I went to the Heirarchy pane, clicked on the "Create" dropdown, and added a particle system. I checked Emission and particles are being emitted, I just can't figure out how to access that emitter via code.

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 hijinxbassist · Jun 04, 2012 at 09:30 AM 0
Share

@emorobot I dont think it is implemented yet. I havent done the recent update, but from what ive tried on my system (3.5.1) it is not possible. The type will be ParticleSystem.Particle[] that much is clear from the ref if you look at GetParticles and SetParticles. I looked at those, GetParticles returns an int so my guess is its co$$anonymous$$g... Thats a bummer. I tried the same thing as your first example and it compiled like it was gonna work, but when you actually try to get the array you get the error...so yeah. I hope they expose some more of the ParticleSystem in general, i wanted to change the shape today dynamically but thats a no go as well.

avatar image eatsleepindie · Jun 04, 2012 at 06:57 PM 0
Share

I came across this example in my searching, thought I'd share. It doesn't answer my question directly, but gives me enough to find a work-around to solve my problem, hopefully it helps you too.

http://catlikecoding.com/unity/tutorials/graphs/

1 Reply

· Add your reply
  • Sort: 
avatar image
1

Answer by Bunny83 · Jun 04, 2012 at 10:36 AM

It actually looks like you're mixing the two different particle engines here. ParticleSystem is the new one (Shuriken). The ParticleEmitter is the old one. They have actually the same purpose. Those components are responsible for emitting and manage particles. I haven't used the new one yet, so i'm not sure if it has everything in one component, but don't mix the components up ;)

From what i can see in the scripting reference the new Shuriken system has the animator integrated since the ParticleSystem has a gravityModifier so i guess it's animatng the particles itself.

edit

It looks like those should be grouped:

Shuriken:

  • ParticleSystem

  • ParticleSystemRenderer

  • ParticleSystem.Particle

The the old system:

  • ParticleEmitter

  • ParticleAnimator

  • ParticleRenderer

  • Particle

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

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

Particle System not working properly? 1 Answer

Particle delay 1 Answer

Two Particle Systems 1 Answer

How to emit all particles from one spot at once? 1 Answer

Align particle rotation with objects rotation? 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