- Home /
Shuriken Scripting, disappointed
I am trying to modify individual particules so that their position, velocity or any other settings update dynamically to where I need them.
So far it seems the only thing we can do is setup the particules initially using SetParticules but the integrated system automatically overwrite any changes I have done afterward.
In short words, I am trying to use an "Elipsoid" effect using shuriken, which is possible so far using a custom mesh. Problem is, the generation of the particules is completly random and there is absolutly no way to disable it, resulting in particules overlapping or spawning in unwanted shapes.
So since Shuriken seemed to have a complete lack of flexibility, I chose to script my effect instead, and yeah.... I didn't expect the ParticuleSystem class to be so limited...
Any solutions?, I am thinking about scratching out the use of Shuriken for it and creating my own system instead, but it really does not please me since I believe using gameobjects as particules will be much more power hungry than using what the particules system uses. Maybe I could go back to the legacy systems? I thinks they were much more flexible, kinda sad to say.
Answer by ShaZe · Jun 09, 2012 at 08:30 AM
Argh, I had forgotten that the GetParticle method that was returning a integer was actually also returning the list of particles to a local array.
int length = particleSystem.GetParticles(particles);
Yeah... I really dislike how some elements within Unity are "Bound" together. Like the GUI element with the If statement, sure, it make common things easier but make advanced operation much more complicated.
At least once you know it, it is fine as long as you remember these exceptions.
I still don't understand why setting a new array of particle created from scratch with brand new parameters was not updating anything tough, I suppose there was a few other necessary variable that either needed to be setted up or that could not be initialized internally.
Oh well, at least the problem has not be resolved and I can now start scripting the hell out of it.
Well then, that's good to hear. Also nice of you to include the solution to your problem.
Now if you'll accept your own answer (click the round v mark on the left) that'd be great. It will mark the question as answered so that future generations can benefit from your solution. :)
Your answer
![](https://koobas.hobune.stream/wayback/20220613072540im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
shuriken auto destruct script doesn't ALWAYS work? 2 Answers
Set a range of startSpeed for Shuriken via script 2 Answers
One material for many objects with different textures 2 Answers
how to access Shuriken Particle System Modules in script 6 Answers
Change new Shuriken Particle System mesh/texture in script? 0 Answers